1

Many users do not compress or resize their images before uploading them into a post, so source images can often be a lot larger than the settings in /wp-admin/options-media.php.

Many theme and plugin authors do not respect the default settings in /wp-admin/options-media.php and often do not create custom sizes for things like gallery sliders.

The result is huge-ass images on pages and a slower internet.

WordPress provides 3 default image sizes and allows theme authors to create custom sizes as needed.

Does anyone know how to force WordPress, themes and plugins into using defined sizes in /wp-admin/options-media.php and/ or custom sizes created with add_image_size?

I've seen a few posts on here about deleting original source files, but it seems to me that leaving the original images on the server is nice a reference and fallback for re-cutting with Regenerate Thumbnails later if you need to change themes at a later date.

9
  • 2
    It's not a direct answer, but don't use those badly written themes and plugins! Jul 25, 2016 at 22:01
  • 1
    Are you just trying to stop all instances of WP falling back on the raw image and force it to use one of the generated sizes at all times? Jul 26, 2016 at 12:02
  • @AndyMacaulay-Brook unfortunately that would limit 99% of themes...
    – jnthnclrk
    Jul 26, 2016 at 15:10
  • 1
    The responsive images solve this issue quite nicely if you tweak them. I have another idea too which I'll work on. Jul 26, 2016 at 15:15
  • 1
    Regarding my first comment, while it wasn't fully serious it's why I write my own themes. Jul 26, 2016 at 15:16

2 Answers 2

1
+50

Imagify will resize images on upload, keep the original, AND optimize all thumbnail sizes at upload time. Best all-in-one solution I've found.

5
  • wordpress.org/plugins/imagify ?
    – jnthnclrk
    Jul 29, 2016 at 12:29
  • Yep, that's the one! I didn't post a link because the overzealous mods here tend to delete answers with links.
    – Zach
    Jul 29, 2016 at 17:17
  • Lol. Imagify looks good, going to test it out... Thanks.
    – jnthnclrk
    Jul 29, 2016 at 21:41
  • Just tested the "Resize larger images" feature and it does it exactly what I need. Great plugin! Thanks! The fact the feature even tells you what your largest thumbnail width is, is also a great time saver.
    – jnthnclrk
    Aug 2, 2016 at 11:25
  • 1
    Worth noting that Kraken, a plugin I already use on multiple sites, does the same thing...
    – jnthnclrk
    Aug 2, 2016 at 11:42
1

I don't think there is any all-in-one solution if theme or plugin uses not resized images. They can reach for source images or even access directly without WordPress functions.

So, the only way to truly force this kind of themes/plugins is to edit they source files. Which is known as bad practice.

But there are some plugins that can reduce this problem without digging into this hard-coded themes/plugins:

Resize images

Resize Image After Upload

This plugin will force WordPress to never keep source images (directly uploaded ones). After upload they will be resized to the defined settings.

Minify images

WP Smush

EWWW Image Optimizer

These plugins will minify and reduce images weight automaticaly right after image upload.

Cache images

W3 Total Cache

Configured to use long cache time for media images will boost loading times.

2
  • Resize Images gets close, but it's a shame it deletes the original. In my view, you should want to keep source images available should you need to change theme and re-process the thumbnail sizes.
    – jnthnclrk
    Jul 26, 2016 at 15:14
  • 1
    But you can resize the original image to a reasonable size, anyway. Something less than 4000x4000. Sometimes, users upload images straight from their camera, so that would be 4000x3000. What I usually do is to resize the original image to 1920x1920, just to be on the safe side for the future.
    – Ciprian
    Jul 28, 2016 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.