Changing image quality of existing CMS images

57 views
Skip to first unread message

Sarthak Sharma

unread,
Apr 19, 2018, 12:36:13 AM4/19/18
to Hippo Community
Hi,

I had created a image set service to cut different size variants of images.
After uploading hundreds of images, I realized after some time that I need to compress images and I changed the compression setting to 0.8.

So, It works when I upload any new image.but the problem is that: those images are already referring a lot of documents in the CMS (and I guess, CMS uses uuid to attach images and not image name)
Now, If I re upload existing images with different names (for example re uploading alpha.jpg to alpha_new.jpg), then I'll have to reattach them to documents.
This whole process can be time taking and error prone.

So, Is there a simple way so that I can apply those optimization settings of image to existing images in CMS?




woonsan.ko

unread,
May 10, 2018, 10:27:49 AM5/10/18
to Hippo Community
Hi Sarthak,

Sorry for late response.
I think it should be the safest way to re-upload those images with the new setting for the following reasons:
- Images are pre-generated in repository anyway on upload. So the image processing should be done anyway however long it takes.
- New image binary node name is better as the old image URLs are cached in client browsers.

To avoid errors, I assume you could have done this:
- Upload a new image for the old image with a rule. e.g, "image1" vs "image1_new" or "old/image1" vs "new/image1".
- Find all the hippo:mirror node having @hippo:docbase is the same as the UUID of the old image handle node.
- Update the @hippo:docbase property by setting it to the UUID of the new image handle node.
- Delete the old image handle.

Regards,

Woonsan

Jeroen Hoffman

unread,
May 11, 2018, 3:55:47 AM5/11/18
to hippo-c...@googlegroups.com

Hi,

The alternative is to regenerate your image sets using the Groovy script that is embedded in the essentials Gallery Manager, at

https://code.onehippo.org/cms-community/hippo-essentials/blob/hippo-essentials-4.2.0-1/plugins/gallery-manager/src/main/resources/ImageSetUpdater.groovy

HTH
Jeroen
--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages