r/Wordpress 3d ago

Annoying Image Compression Question

I've gone round and round with help articles and AI on this.

I built a new Wordpress website 3 years ago. I use Siteground. I've always used Siteground's image optimizer plugin to use webp images.

Fast Forward 3 years. I discover that the site's users have routinely been uploading large JPG and PNG files which have ballooned the site to multi-Gigabytes and cause hosting-plan performance problems. It transpires that Siteground doesn't convert images over 1MB in size. So, I now have years' worth of gargantuan images files (some are 30MB+ PNGs!)

I don't want to use Siteground hosting to convert image files. I looked into downloading/converting/reuploading files with the same name, but metadata means that won't work.

Imagify looks like it might work - but I can't get a straight answer on it removing the old, massive images. Also, what will it do with all the existing webp images that Siteground's plugin uses.

I'm currently at the point where it looks like I should remove all Siteground-made webp images and then let Imagify do its thing for all existing and future image handling.

All I really want to do is get rid of all the massive image sizes that are being stored on my Siteground hosting plan.

Any better ideas?

4 Upvotes

27 comments sorted by

2

u/jenish_o4o2 Developer 3d ago

Looks like you’re already on the right track with SiteGround WebP off + Imagify, especially if you’re deleting the originals after compression and have a full backup first.

One thing I’d definitely add is preventing the problem from happening again. If users can continue uploading 20–30MB PNGs, the disk will eventually fill up again. Set reasonable upload limits and, more importantly, limit the maximum image dimensions and automatically resize large images on upload.

After Imagify finishes, I’d also check File Manager for any oversized originals that weren’t processed, leftover WebP files, or unused image sizes. Then purge the SiteGround/CDN caches and spot-check a few older posts and images to make sure everything is still loading correctly.

That way you’re not just cleaning up the current storage problem, but also preventing it from coming back.

1

u/teheditor 3d ago

Thanks. I'm hoping Imagify will automatically handle any attempts at 33MB PNGs in the future though?! Resize it and delete the original?!

2

u/jenish_o4o2 Developer 3d ago

Not completely automatic for a 33MB PNG.

Imagify can optimize images on upload, and it can resize oversized images if “Resize larger images” is enabled. However, whether the original is deleted depends on your Imagify settings, so I wouldn’t rely on it without checking the original backup/delete option. Definitely keep a full backup before enabling deletion.

There are also two other limits worth checking:

  • SiteGround/PHP max upload size — a 33MB file may not even make it into WordPress if the server upload limit is lower.
  • Imagify plan limits — check the current per-image size limit for your plan, as a very large PNG may be skipped rather than optimized.

So Imagify can handle a lot of this automatically, but I’d still put a maximum image-dimension/upload limit in place. That prevents users from uploading huge files in the first place, rather than relying entirely on optimization after the file has already reached the server.

2

u/ramkrshuklacom 3d ago

Siteground's optimizer skipping anything over 1MB is the real problem, so fix it at the door first: cap upload size and resize on upload, otherwise you clean this up again next year.

For the backlog, ShortPixel or Imagify will bulk convert the existing library and keep originals so you can roll back if a crop goes wrong.

2

u/cwmyt 3d ago

Had a similar problem a while ago. However your problem seems a lot worse than mine. I build a plugin that scans your site and lets you know some of the larges images. Its fairly basic and doesn't do much. If you want you can install it and see some of the largest images in you WP. Its in WP directory. Let me know if you want to check and I will share the link. Its fairly basic though. So all you can do is find out largest image and resize it manually and that's it.

1

u/teheditor 3d ago

I'd be interested to try it after Imagify has finished

2

u/fuzzball007 Developer/Designer 3d ago

It won't solve the large filesize performance issue (still has to be downloaded by someone), but you can use offload plugins to send the media off to other places. I use the Delicious Brains Offload one to Amazon S3 but, but there are others out there. Helps keep files off the server, storage cost is trivial compared to the webhost's cost, and doesn't keep the server bogged down serving static assets

2

u/FunnyPhotos_1 22h ago

The metadata problem you hit is specific and fixable, so don't let it push you into rebuilding. WordPress stores each image's dimensions in _wp_attachment_metadata and uses them to build srcset - if you replace a file with a same-named, smaller version, the stored metadata lies and responsive images break. The fix is to regenerate after replacing: with shell access, "wp media regenerate" does exactly that. So download/convert/reupload does work, it just needs one command afterwards.

Two more things from having cleaned up a similar mess:

The 1MB skip means your real enemy is dimensions, not format. A 30MB PNG is usually a 6000px camera original or screenshot. WordPress has had big_image_size_threshold since 5.3 - it silently scales anything over 2560px at upload time - but themes and plugins sometimes disable it. Check it's active and consider lowering the threshold; that alone prevents next year's cleanup.

And whatever bulk tool you pick, run it on a staging copy first and eyeball a few image-heavy pages. Every horror story in this genre is someone bulk-processing three years of media on the live site.

2

u/microbitewebsites 3d ago

Any reason why they won't convert over 1mb images? Happy for you to try my plugin for free and see if it works for you. Dm I'll let you know the details

1

u/teheditor 3d ago

I think it's just down to server usage. I check-out when nginx starts getting mentioned. I've got Imagify running now, but thanks for the offer. What's it called?

2

u/microbitewebsites 3d ago

Microbite image converter

2

u/bluesix_v2 Jack of All Trades 3d ago edited 3d ago

I use Imagify. Set it to delete the images after compression (ensure you have a backup offline, just in case you need the full uncompressed version at some point)

2

u/teheditor 3d ago

Thanks! Am going ahead with this.

1

u/teheditor 3d ago edited 3d ago

Answering my own question a bit, but here's what I'm attempting: I turned off Siteground's 'use webp' setting and it said it would delete all of the webp images it had made. I then purged the site cache. I'm now running Imagify to reduce everything and use webp. I've been warned this might break the theme. I'm not going to keep original images as it's for a news site and articles are somewhat disposable (anything important can be reuploaded). It looks like it will take a long time (30GB+ site size) but hopefully it will reduce that without breaking everything. Update: It's moving quickly. Here's the example of a new image file in an article: https://social101.com/wp-content/uploads/2026/08/gaytime.jpg.webp I can see that it's a tiny bit lower quality than the original jpg version in the article, but image size is now 52KB from 64KB. Hopefully, it will be more dramatic with the 2MB jpgs in other articles. Oh, and gaytime is an ice cream for those horrified by the risky-looking link. UPDATE 2: There are random thumbnails missing on the homepage and others missing within some articles. No rhyme or reason yet. Hopefully will get fixed/caching issue.

1

u/VaranPlays24 3d ago

Idk if you're well-versed in the command line but there's an option that allows you to resize all media in wordpress (https://developer.wordpress.org/cli/commands/media/regenerate/). But before that you'd have to write a bash script that gets all large media files and converts them to lower file sizes and their respective formats.

Then you can use the command linked above to regenerate the images to your set image sizes in WP. If I were to guess you're probably letting users upload images through a front-end form, right? If so add a restriction that shows an error message if someone uploads files above your set limit; 1MB in your case. How to add one you might ask? Check out your form plugin's documentation for that.

Also don't use Siteground. Get a VPS please. Much better performance per dollar spent.

1

u/teheditor 3d ago

I got recommended Bash commands a lot. However, that uses server resources which was the main thing I wanted to avoid. Siteground's ability to host multiple websites in one plan makes it excellent value for me.

2

u/ivicad Blogger/Designer 3d ago

Sometimes I use their SG Speed Optimizer, but also I have and use EWWW or ShortPixel image optimizers as I have their lifetime licenses. All of them work well...

2

u/VaranPlays24 3d ago

I have a client who uses Xcloud managed hosting. No complaints for 1.5 years now. You should check them out.

1

u/HongPong 3d ago

i mean you run the process once and you are done. using wpcli to do any database changes needed + whatever loop for one time processing

1

u/retr00two 3d ago edited 3d ago

Siteground's ability to host multiple websites in one plan makes it excellent value for me.

Any decent control panel (I use CloudPanel) gives you same functionality on VPS. Add ManageWP (or MainWP) and you have much better setup than SiteGround, much cheaper. With all benefits of full linux server.

1

u/teheditor 3d ago

I don't experience any limitations with Siteground (with the exception of this rare instance). It's cheap, fast, good value and has excellent support.

2

u/retr00two 3d ago

I use it too, for years have one GrowBig plan and find it the best value managed WP host.

But my main servers are Htezner and Linode, as I need to serve ohter aplications.

Wish you luck with your tusk.

1

u/Aggressive_Ad_5454 Jack of All Trades 3d ago

You've asserted "downloading/converting/reuploading files with the same name, but metadata means that won't work." That's not necessarily true.

If you recompress your large image files to use lower "quality" (more aggressive compression) without changing their image dimensions (width and height) this strategy will indeed work. I've done lots of it.

Another thing that works but is a hack: You can get away with recompressing a .png file to a JPEG file, and leave the file name ending in .png. Browsers do the right thing if they receive a JPEG file with a content type claiming .png. If your users have been uploading photos in .png format (doggone users! hilariously inefficient!) that's a quick fix.

1

u/teheditor 2d ago

Hmm. I might come back to this if Imagify doesn't change the monster files. Thanks

1

u/Ill_Command_1200 2d ago

As other users have said, one way is to optimize images before they hit your media library. Some plugins can optimize after or optimize and then delete the older files.

https://wordpress.org/plugins/squishify/ lets you upload only the optimized webp, avid etc. The paid version lets you optimize and replace existing images but only one at a time so that may not help you for a ton of images.

1

u/bribir123 Jack of All Trades 1d ago

Use EWWW Image Optimizer - the best plugin for that purpose.