store thumb and medium metadata and only resize if necessary