How can I change the default size of the small, medium, and large thumbnails?
Thanks!
Search Forums
5 posts Started 11 years ago by ed Latest reply from Felix Schwarz
How can I change the default size of the small, medium, and large thumbnails?
Thanks!
Sizes are set here: mediacore/config/environment.py
There is one change that I would recommend in this file though: mediacore/lib/thumbnails.py, especially if you are making the thumbs larger. The default JPEG quality for the PIL is 75, which I think is really crappy. You might want to consider adding the "quality" parameter to the thumbnail save and provide a value higher than 75 depending on your file size to quality preferences. I decided to go with a value of 95 but I'm sure a value of 85 or 90 would produce better results as well.
for key, xy in config['thumb_sizes'][item._thumb_dir].iteritems():
path = thumb_path(item, key)
thumb_img = resize_thumb(img, xy)
if thumb_img.mode != "RGB":
thumb_img = thumb_img.convert("RGB")
thumb_img.save(path, quality=95)
Thank you!
I will definitely change the thumbnail size and quality.
Is there anything else I need to do after changing the environment.py settings?
well, the setting only applies for new thumbnails so you would have to reprocess all existing ones.
You must log in to post.