• I know the editors of a blog can change the size of image attachments within a post (typically small, medium, large and full size) when they add media. However, it’s not always the case that all editors do this properly. This allows some posts to have images in full size (with resolutions in the thousands). Even though images are being scaled to fit the content through CSS, it’s not in any way an optimal solution. I want a fool-proof solution for this.

    I’ve tried googling this for some time now, and I can’t seem to find a good solution. Ideally I’d prefer to filter all image attachments within a blog post and apply a custom image size to them (which I’ve prepared using “add_image_size”) with no cropping. The custom image width is fixed, but the height is dynamic. I doesn’t matter whether the images are in full size in the editor, I just don’t want the full size images to be loaded for the visitors.

    This is not the featured image of a blog post, but the images/media within the single blog post.

    Any ideas, or if there’s a filter I can apply to make this happen (or simply a plugin I can use) ?

    Thanks in advance!

Viewing 1 replies (of 1 total)
  • You might want to take a look at the EWWW Image Optimizer Plugin. As well as being able to fix overly large existing images, I believe you can set it up so it will resize those huge images editors like to upload on the fly, and I think you can configure it so that the full-sized images are of a size you won’t mind having displayed in a responsive theme.

Viewing 1 replies (of 1 total)

The topic ‘Overwriting post image attachment size’ is closed to new replies.