def resolve_srcset(self, info): asset = self.primary_image_webasset if asset: return [ f"{src[1]} {src[0]}w" for src in generate_srcset_urls(asset) ] return []
def get_srcset(self, path): rel_path = path.relative_to(self.get_root()).as_posix() return generate_srcset_urls(rel_path)
def get_srcset(self, p): return generate_srcset_urls(self.upload)
def get_srcset(self, mo): return generate_srcset_urls(self._get_image_url(mo))