You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 28, 2017. It is now read-only.
When try to create thumbnail using command athumb_regen_field thumbnail getting created with different name so in front end it is not showing the updated thumbnail, showing old one. This issue is only when already generated thumbnail image is there in the disk.
This can be resolved by removing the initial image when we regenerate the thumbnails.
def create_and_store_thumb(self, image, thumb_name, thumb_options):
"""
Given that 'image' is a PIL Image object, create a thumbnail for the
given size tuple and store it via the storage backend.
image: (Image) PIL Image object.
size: (tuple) Tuple in form of (width, height). Image will be
thumbnailed to this size.
"""
size = thumb_options['size']
upscale = thumb_options.get('upscale', True)
crop = thumb_options.get('crop')
if crop is True:
# We'll just make an assumption here. Center cropping is the
# typical default.
crop = 'center'
thumb_filename = self._calc_thumb_filename(thumb_name)
# remove thumbnail file if already exist
try:
os.remove("%s/%s" % (settings.MEDIA_ROOT, thumb_filename))
except OSError:
# No thumbnail files initially
pass
The text was updated successfully, but these errors were encountered:
I'm not sure I understand the problem, but athumb isn't really meant to be used with local storage. It's pretty S3-specific. I don't think we've ran into this with S3.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When try to create thumbnail using command
athumb_regen_field
thumbnail getting created with different name so in front end it is not showing the updated thumbnail, showing old one. This issue is only when already generated thumbnail image is there in the disk.This can be resolved by removing the initial image when we regenerate the thumbnails.
The text was updated successfully, but these errors were encountered: