Site logo

Archived topic

Two questions - Size of thumbnails and Scaled images

3 replies · Started by Sandra on May 17, 2020

Viewing posts 1–4 of 4

Hi guys!

I have tried to regenerate thumbnails many times but the size of featured images of my posts are not the same. I have attached a url of my site to let you see it. It's only an example, the issue applies for all the entire site.

In the other hand, I have 8 images that are not scaled. I have many images on my site but only these are not scaled and I don't know why... I test with one image, resize it manually and upload again but the issue is the same.

/wp-content/uploads/2020/04/Localizaciones-Como-Conoci-a-Vuestra-Madre-Portada-@Voy-a-NYC.png is resized in HTML or CSS from 1000x750 to 260x195. Serving a scaled image could save 356.0KiB (93% reduction).

/wp-content/uploads/2020/04/Escaleras-incendios-Nueva-York-2.jpg is resized in HTML or CSS from 999x758 to 260x197. Serving a scaled image could save 293.5KiB (93% reduction).

/wp-content/uploads/2016/07/Rascacielos-de-Nueva-York-@Voy-a-NYC.png is resized in HTML or CSS from 1000x800 to 260x208. Serving a scaled image could save 291.7KiB (93% reduction).

/wp-content/uploads/2020/04/Hudson-Yards-Nueva-York-Voy-a-NYCF.jpg is resized in HTML or CSS from 1000x750 to 260x195. Serving a scaled image could save 234.7KiB (93% reduction).

/wp-content/uploads/2020/05/Que-visitar-en-Nueva-York-@Voy-a-NYC-1.png is resized in HTML or CSS from 800x450 to 260x146. Serving a scaled image could save 230.7KiB (89% reduction).

/wp-content/uploads/2017/03/Comer-Burger-en-Nueva-York.jpg is resized in HTML or CSS from 1000x666 to 260x173. Serving a scaled image could save 113.9KiB (93% reduction).

/wp-content/uploads/2020/04/Peliculas-y-Series-Nueva-York.jpg is resized in HTML or CSS from 1000x562 to 260x146. Serving a scaled image could save 41.4KiB (93% reduction).

/wp-content/uploads/2020/05/1-Vuelos-NYC.png is resized in HTML or CSS from 907x150 to 263x43. Serving a scaled image could save 4.0KiB (91% reduction).

I have the same config on another site that is using GP also, but in this one I could not solve the problem. I use the same methodology to upload images on both sites.

Can you help me please? I have read many threats on your forum but I could not get the solution.

I appreciate any help. Thanks in advance for your support.

Hi there,

Have you created an image size for your images?: https://docs.generatepress.com/article/adding-image-sizes/

Once you've done that (after you regenerate your thumbnails), you can set the "Media Attachment Size" option in Customize > Layout > Blog to your newly created image size.

Let me know :)

Hi Tom, thanks.

I'm not good coding and I don't know how to do it but i'll try. What image size do you recommend? What will happen with the thumbnail size of the featured post?

Anyway, I don´t understand why my site have different image size on every thumbnail. There aren't any thumbnail same than other :-(

Thanks for your support

Your image sizes are all different/have different aspect ratios, which is why they're displaying differently.

Are you wanting them all to be the same height?

If so:

1. Add this PHP:

add_action( 'init', function() {
    add_image_size( 'my-archive-featured-image', 300, 250, true ); // 300 width, 250 height, crop
} );

Adding PHP: https://docs.generatepress.com/article/adding-php/

2. Regenerate your thumbnails with a plugin like this: https://wordpress.org/plugins/regenerate-thumbnails/

3. Go to "Customize > Layout > Blog" and set your "Media Attachment Size" option to my-archive-featured-image (or whatever you name it).

That way they will all be the same size.

This archived topic is closed to new replies.