Developer forum
E-mail notifications
Gallery module: compression option
Is there any option to control the compression quality of the Images generated by gallery module? It seems that the jpg images generated are not good quality. If I replace the generated images by my original images, it still replaces them and generates new images. Is there a way to change the quality of compression?
Thanks.
Replies
I've added it as a backlog item for DW 8 so it can be controlled on paragraph level.
You can use GetImage.aspx in the mean time on the original image - with that you can control compression.
Hi,
Yes please, low compression was also a problem when selling the old image gallery module to customers. Please set it as 100 % as default.
David
Thank you very much for the reply.
Could you please tell me how to use GetImage.aspx? Where should I specify it?Hi, see my blog at http://www.grublestova.no/dynamicweb/general/imageglue.aspx for an explanation. You will have to change the ParagraphImageCleanTag to the Gallery module tag that fetches the image.
Thank you very much for the reply.
Good luck
David
That was very useful. For now, I have just used <!--@Gallery.Image.Path--> which returns the original image. And if I need a post processed image I would be able to use GetImage.aspx with the original image.
However I am concerned that GetImage.aspx might slow down the page loading as it might convert the image every single time. Same for the gallery, it seems that for every page load it regenerate the resized images. Can I avoid this?
GetImage.aspx caches its output on disk - and it is only redone when the original changes or one of the parameters.
Gallery module redos the thumbnails when you are using the preview button from administration - it gives a URL with ?purge=true in the querystring parameters. And that makes a redo of the thumbnails.
If you just browse the page without purge=true, images are used without making new thumbnails.
Imar
When publishing a folder, caching is placed in 2 subfolders called GalleryImages and GalleryThumbs - so no reusing of the same cache folder.
/Gallery1/1.jpg would be cached in /Gallery1/GalleryImages/1.jpg and /Gallery1/GalleryThumbs/1.jpg
and
/Gallery2/1.jpg would be cached in /Gallery2/GalleryImages/1.jpg and /Gallery2/GalleryThumbs/1.jpg
Hi Nicolai,
Yes, you're right. I looked up the issue and it's slight different. The problem occurs when using the same Gallery on multiple pages with different image dimensions. I could, for example, show a gallery with small images on the homepage and bigger ones on a different page. Here's the text from the original case:
Why does the module store the thumbs on disk in a fixed name folder? That's asking for a lot of trouble. Consider this scenario:
1. Let's say I have two pages, each with the Gallery module. One with a thumb size of 500x500 and one with 50x50 pointing to the same folder of high-res images
2. The first time I access 500x500.aspx the thumbs are generated and stored in GalleryThumbs with a width of 500x500
3. If I then access 50x50.aspx, the thumbs are generated and stored in GalleryThumbs, overwriting the existing ones
4. If I then hit 500x500.aspx again, new thumbs are generated overwriting the old ones again.This leads to at least two problems:
1. Caching is not as effective as it can be, as new thumbs are generated frequently
2. I run the risk of getting thumbs from paragraph 1 shown on paragraph 2 (with an incorrect size)Why doesn't the module use the built-in GetImage.aspx handler that supports sizing, caching and what more.
Imar
Yes - that is a bug.
I've forwarded it to QA to check if it is already registered.
However, Gallery module is regenerating images in GalleryImages folder every single time I refresh the page without pruge=true parameter.
Imar, I reproduced your problem and thank you for the steps to reproduce.
There is a problem with generation of thumbnails when using the same image folder on different pages - with different dimensions. The bug is 7281.
Maulik, I can't reproduce the issue, that it regenerates the images when loading without purge=true. Only when I open different pages that uses the same folder.
I am not sure why, but it happens on my side every single time. I am not sure of the reasons. May be I am missing some settings? If you want I can share the template I am using, if that could be helpful.
Thanks,
-Maulik
Maulik, If you could provide us with an url to your solution and the the show us the page, that have the problem, it would be easier to check what's happening.
You must be logged in to post in the forum