We propose an algorithm (IsMST) to organise and compress groups of similar images using a Minimum Spanning Tree (MST). This data structure supports Content Based Image Retrieval (CBIR) and also facilitates a better compression performance than is attained using JPEG2000 on each image individually.