Announcement

#1 2021-10-04 00:33:19

sierra.bmwcca
Member
2021-09-26
12

Optimize existing images

Hello/Hi/Greetings,

I am getting RESOURCE LIMIT REACHED and think that may be because I have some very big images (1MB+) that were uploaded early on. I was wondering if there is any way to optimize the sizes and smush (kind of like the wordpress smush plugin) them.

I have the photo sizes set to and they are all checked.
Multiple Size
Square    120 x 120 pixels, crop   
Thumbnail    144 x 144 pixels   
XXS - tiny    240 x 240 pixels   
XS - extra small    432 x 324 pixels   
S - small    576 x 432 pixels   
M - medium    792 x 594 pixels   
L - large    1008 x 756 pixels   
XL - extra large    1224 x 918 pixels   
XXL - huge    1656 x 1242 pixels   
Image quality 95 %

If I change the image quality will it go back and go through the pictures or will it only be new uploaded pics? If I uncheck some of the sizes will it go back and delete them?



Lock gallery
Update albums' information
Update photos' information
Repair and optimize database
Reinitialize integrity check
Purge user cache
Delete orphan tags
Purge history details
Purge history summary
Purge sessions
Purge never used notification feeds
Purge search history
Purge compiled templates
Delete multiple size images: All, Square, Thumbnail, XXS - tiny, XS - extra small, S - small, M - medium, L - large, XL - extra large, XXL - huge, Custom
Environment
Piwigo 11.5.0 Check for upgrade
Operating system: Linux
PHP: 7.4.23 (Show info) [2021-10-03 15:02:29]
MySQL: 5.5.5-10.3.31-MariaDB-log [2021-10-03 12:02:29]
Graphics Library: External ImageMagick 6.9.10-68

Piwigo URL: https://gallery.sierrabmwcarclub.org

Offline

 

#2 2021-10-04 10:00:30

Zentalquabula
Member
2014-05-10
208

Re: Optimize existing images

Would be less of an issue if webp was available. Jpeg really sucks.

However, you absolutely don't need 95% quality, and it should be reduced to 75% or even 50%.

You can also replace photos and albums, not sure if a plugin is needed. Ideally, you would then make new originals from your raw images with a smaller footprint, and then replace the originals. Smaller sizes will be regenerated.

You also don't need that many sizes. S, L and XXL are enough, and I really don't think 1656x1242 is "huge" in this day and age.

Piwigo needs to be modernized, and display images with double resolution, apart from using webp.

Offline

 

#3 2021-10-04 12:16:10

erAck
Only trying to help
2015-09-06
1337

Re: Optimize existing images

You should clarify first why you get "Resource Limit Reached" errors before you jump to conclusions pointing to image size handling. What action is even triggering the error? How much RAM can ImageMagick use? How much memory is available to PHP? To what degree are your file systems filled? (inodes and all). Are you on an underequipped shared host?

However, to update images you can use [extension by plg] Photo Update (single photos) or [extension by PhilippeWd] Update Album (several photos in one album).


Running Piwigo at https://erack.net/gallery/

Offline

 

#4 2021-10-05 03:36:49

sierra.bmwcca
Member
2021-09-26
12

Re: Optimize existing images

Thanks everyone for taking the time to respond.

With regards to
"You should clarify first why you get "Resource Limit Reached" errors before you jump to conclusions pointing to image size handling. What action is even triggering the error? How much RAM can ImageMagick use? How much memory is available to PHP? To what degree are your file systems filled? (inodes and all). Are you on an underequipped shared host?"

Sorry not a server techie person so I don't know how to determine any of those things. :(

So the only answer is I would have to download all those pictures, resize them and re-upload them? I was trying to avoid that.

Could I use the Scaler from  "Images" in cPanel? https://docs.cpanel.net/cpanel/files/images/

Thanks again

Offline

 

#5 2021-10-05 16:42:32

erAck
Only trying to help
2015-09-06
1337

Re: Optimize existing images

sierra.bmwcca wrote:

Sorry not a server techie person so I don't know how to determine any of those things. :(

Well, then, ask your hosting provider if they see a bottleneck?

So the only answer is I would have to download all those pictures, resize them and re-upload them? I was trying to avoid that.

As long as the cause is unknown the solution is either.
Of course you can try to resize and re-upload images, maybe it helps, maybe it doesn't.

Could I use the Scaler from  "Images" in cPanel? https://docs.cpanel.net/cpanel/files/images/

No idea, never used cPanel. But if you externally modify an image file it invalidates its record in the database's piwigo_images table, like filesize, width, height and md5sum. That doesn't sound like a good idea unless you know how to sync those.


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2022 · Contact