-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full image size in src attribute #39
Comments
Hello, Slamik. Thank you for the question. We strongly do not recommend using the original size of the picture therefore the size might be, for example, 3k pixels, 4k or bigger and it affected the website loading and rendering speed. As some option to solve your issue you can add some 'extra-large' size to the configuration array with a high value: |
Hello Vitaly, Thank you for your response!
Referencing to Google recommendations https://developers.google.com/search/docs/advanced/guidelines/google-images img src should link to max resolution. This image will be crawled by googlebot. User will load only image contained in srcset. In modern SEO image size is ranking factor. As I understand from code, src attribute takes the last element from configuration array, so I just need to put max size to the end of it. Right? |
Hi Slamik. The 'image' tag src attribute selects the actual image size based on the current screen width from the 'picture' tag 'source' options. At the same time, the 'sources' contain the entire list of configured sizes. Also, you could read this text about responsive images on the web -- https://developers.google.com/web/fundamentals/design-and-ux/responsive/images You can find a live example of the plugin on our website - https://justcoded.com/ All images on our website rendered by this plugin. Hope I answered your question. |
Hello,
Is it possible to configure rwd_attachment_image or $my_image_sizes array to display original image or the biggest one in src attribute?
It's important for correct lazyload setup and SEO. Placeholders should be in srcset and original image in max resolution should be in src tag.
More info you can get from this video https://youtu.be/F6KGcb6trXc?t=2428
The text was updated successfully, but these errors were encountered: