- This topic has 13 replies, 2 voices, and was last updated 3 years, 8 months ago by David.
-
AuthorPosts
-
May 8, 2020 at 8:14 am #1275501Matt
Hey,
Loving working with GP so far and using the Dispatch theme. It relies heavily on the WP Show Posts plugin, but a drawback is that this plugin doesn’t use the srcset property for images, so all images are being served at full size – even if they are being resized by the CSS.
I appreciate you’re working on the changing it for Gutenberg at the moment but would like to suggest implementing this as a priority.
I’d imagine quite a few others heavily weighed up the impact of speed when buying this theme – as I did. This currently impacts my site a fair bit and having images served at different size based on display size would be a massive help.
May 8, 2020 at 3:51 pm #1276020TomLead DeveloperLead DeveloperHi Matt,
As long as you don’t use the WPSP image width/height controls, they should use srcset like anything else.
Can you check with those options empty?
Let me know ๐
May 11, 2020 at 8:37 am #1279348MattHey, I think this is to do with a cdn I have – thanks for the response though!
May 11, 2020 at 5:28 pm #1279989TomLead DeveloperLead DeveloperNo problem!
August 24, 2020 at 2:55 am #1415696EvenitHello,
I am also using this plugin, is it possible to implement src set even when using WPSP image width/height controls?I need to use these controls in my article listings…
Thanks
RegardsAugust 24, 2020 at 5:03 am #1415869DavidStaffCustomer SupportHi there,
unfortunately not – if you change the sizes then it overwrites the srcset sizes.
You can of course add more media attachment sizes to the srcset:https://docs.generatepress.com/article/adding-image-sizes/
This would allow you to add sizes that are more conducive to your different responsive layouts.
August 24, 2020 at 8:08 am #1416289EvenitThank you David, I see in the tutorial how to add new image sizes to my WordPress site, but it is not clear to me how to add the media attachment sizes to the srcset in the article lists I create with WPSP plugin.
August 24, 2020 at 12:29 pm #1416640DavidStaffCustomer SupportI believe currently you can only set the Default size for ALL WPSP Images using this filter:
add_filter( 'wpsp_default_image_size', function() { return 'your-size-name'; } );
You cannot currently set them differently for each list. Tom has it planned in for WPSP 1.2.
However, how are you lists displayed on responsive views? ie. fewer columns with larger images on Tablet and Mobile. If thats the case then you probably want to leave src-set to do its thing and just create additional attachment sizes if required to fill that need.
August 26, 2020 at 12:16 am #1418408EvenitHi David,
I’m not sure I understand.
In my case I would have, for example, a list with the following dimensions:
2 columns with 640×360 images
in the mobile version the images should become 423×238
I hope I have better clarified my need.
Thanks
RegardsLorenzo
August 26, 2020 at 1:27 am #1418484DavidStaffCustomer SupportOn load the browser will calculate the size of the image container, and with those dimensions selects the nearest image size available.
You can therefore register images attachment sizes that are more appropriate for your site.
Eg. A medium size of 440px to suit your mobile columns.
August 26, 2020 at 1:38 am #1418499EvenitSo are you suggesting me not to set the image size with the WP Show Posts Controls? In this way it will use the native WordPress src set?
If I understand correctly, it would be enough for me to create sizes that suits my needs with Regenerate Thumbnail plugin, correct?August 26, 2020 at 2:11 am #1418531DavidStaffCustomer SupportYes, thats correct ๐
August 26, 2020 at 4:59 am #1418762EvenitIn this way the problem I have is that all images in archives have different heights, so the archive page becomes ugly to see… maybe the best solution for me is to wait for the WPSP 1.2 release, so I can set the defalut size image for each list. Do you already know when the next release will come out?
August 26, 2020 at 5:08 am #1418780DavidStaffCustomer SupportWhen using the add image size you can just define the width, this will ‘auto’ the height and keep the original aspect ratio eg.:
add_image_size( 'my-custom-image-name', 440 );
WPSP Pro version 1.0 is still in alpha and this is next on our list of updates.
We don’t have a definitive time line on 1.2 release just yet. -
AuthorPosts
- You must be logged in to reply to this topic.