diff --git a/easy_thumbnails/files.py b/easy_thumbnails/files.py index 4925319..853eaf3 100644 --- a/easy_thumbnails/files.py +++ b/easy_thumbnails/files.py @@ -422,6 +422,10 @@ def get_thumbnail_name(self, thumbnail_options, transparent=False): """ thumbnail_options = self.get_options(thumbnail_options) path, source_filename = os.path.split(self.name) + # remove storage location + path = path.replace(self.source_storage.location, '') + # remove leading slash if present + path = path.lstrip('/') source_extension = os.path.splitext(source_filename)[1][1:].lower() preserve_extensions = self.thumbnail_preserve_extensions if preserve_extensions is True or isinstance(preserve_extensions, (list, tuple)) and \