- This topic has 3 replies, 2 voices, and was last updated 3 years, 10 months ago by Tom.
-
AuthorPosts
-
May 17, 2020 at 3:48 am #1288338Sandra
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 1000×750 to 260×195. 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 999×758 to 260×197. 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 1000×800 to 260×208. 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 1000×750 to 260×195. 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 800×450 to 260×146. 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 1000×666 to 260×173. 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 1000×562 to 260×146. 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 907×150 to 263×43. 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.
May 17, 2020 at 10:52 am #1288954TomLead DeveloperLead DeveloperHi 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 🙂
May 18, 2020 at 9:26 am #1290448SandraHi 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
May 18, 2020 at 4:02 pm #1290903TomLead DeveloperLead DeveloperYour 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.
-
AuthorPosts
- You must be logged in to reply to this topic.