Responsive images srcset
-
Is delivering scaled images using srcset a good idea?
Thinking of delivering one image size to Mobile and another to Desktop. How can I do this for all browsers?
Thanks Mike
-
AFAIK since the way images are used online hasn't 'significantly' changed in decades (as Zohaib says) - there is no factual industry standard. But this technique seems like it could yield faster page-loading speeds for mobile, which we all know Google does stand behind. Google often come up with an error on Page Speed insights which says, you are serving massive resolution images with a tiny viewport. They actually can and do regard that as an error, so surely if Google documents that the technique is acceptable to them and we know it solves certain issues, it is at least 'worth a try' IMO
-
I've always used CSS to scale images between devices. Though this can increase the page loading times, so for better performance there are plugins available for CMSs to improve page rendering speeds,
-
Images are some of the most important pieces of information on the web, but over the web’s 25-year history, they haven’t been very adaptable at all. Everything about them has been stubbornly fixed: their size, format and crop, all set in stone by a single
src
. -
Thanks, yes I had read this article but can't find any websites using this technique. Has it been adopted as an industry standard, or is there another option?
-
Google doesn't seem to have a problem with this:
https://developers.google.com/web/fundamentals/design-and-ux/responsive/images
"TL;DR
- Use relative sizes for images to prevent them from accidentally overflowing the container.
- Use the
picture
element when you want to specify different images depending on device characteristics (a.k.a. art direction). - Use
srcset
and thex
descriptor in theimg
element to give hints to the browser about the best image to use when choosing from different densities. - If your page only has one or two images and these are not used elsewhere on your site, consider using inline images to reduce file requests.
-
Enhance
img
s withsrcset
for high DPI devicesThe
srcset
attribute enhances the behavior of theimg
element, making it easy to provide multiple image files for different device characteristics. Similar to theimage-set
CSS function native to CSS,srcset
allows the browser to choose the best image depending on the characteristics of the device, for example using a 2x image on a 2x display, and potentially in the future, a 1x image on a 2x device when on a limited bandwidth network."This part seemed most important to me:
"On browsers that don't support
srcset
, the browser simply uses the default image file specified by thesrc
_ attribute. This is why it is important to always include a 1x image that can be displayed on any device, regardless of capabilities._ "... so basically you define your srcset as per Google's documentation, but you must be sure to include a default fallback image that could work on all browsers and devices - that's what gets used if the browser is unable to interpret your srcset (or if your srcset doesn't include anything for the specified browser)
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
High image rank
Hi everyone I have a question and I hope you can help me or at least introduce some moz post to me.I want to have high rank in google image so I use a descriptive alt text and image title. I used related content and keyword for my pictures but there still some issue should I use the exact keyword in my header and content?and repeat them OVER AND OVER ?can you help me with this issue?
On-Page Optimization | | talaabshode20200 -
International website - Image names
Hello All! In an international website, it is recommended to have a copy of every image for every language in the website (with translate filenames)? or it is better to use only one copy of each image and change only the alt attributes? Thanks for the help.
On-Page Optimization | | dMaLasp0 -
Image Titles and Descriptions Question
Hello, I have a question about optimizing the SEO on my pages through image titles and descriptions. There are a few times on my website that I use the same image on multiple pages. I am under the impression that giving it a title such as "social-media-marketing-agency-graphic.jpg" will help the SEO for the phrase "social media marketing agency" on that page. My question was, if I want to use the same image on multiple pages, am I better off uploading an entirely new image with a new title to make it more relevant to the new page? Or will this not make large enough of a difference? Or is there an easier solution? Please let me know your thoughts on how to best optimize the pages
On-Page Optimization | | brightsocial0 -
Background Images and ALT text
We pretty much exclusively use background images for our sites. How do I add in alt text? I tried a Google search for this issue and the best answer I could find was "Use the 'title' tag in the containing div", but that was from 2010. Is there a better way to do it? And no, we're not going to switch to using standard images, because background images are way more slick for UX.
On-Page Optimization | | MichaelGregory0 -
Optimizing images on website. Is it bad to use the same alt names and keywords?
I have a webpage that I have 6 separate images showing step by step instructions of how to use our product with a sentence describing instruction inside image. I took screenshots of the instructions from the products App and uploaded them to webpage because they provide a great visual. I want to make sure I optimize correctly, can I use the same keywords for all the image names?
On-Page Optimization | | artscube.biz0 -
Images, using a lightbox would it go against adsense TOS?
Something I have been trying to figure out. On my website each member can have up to 10 images. When viewing a profile you can select each different photo and we currently use javascript to display this in a small box so the page does not re-load. I am curious for ideas, would we be better off having the images load on a different page? Giving more pages per visit in GA or would a lightbox type pop up be optimal. My concern is that the lightbox (similar to how Facebook displays images) would be a violation of google adsense TOS. I tried to talk with a help desk member from google regarding this but I am not even sure they could speak english to understand what I was saying. What do you guys think? When it comes to handling groups of images how would you best display them for user happiness and search engine optimisation?
On-Page Optimization | | Burto0 -
Alt and title tags on images
For SEO, are alt and title tags still worth the effort? Or have they gone the way of meta keywords? I can see having alt tags for visually impaired reasons, but at this point is there any SEO reason to use them?
On-Page Optimization | | CompucastWeb0 -
Summarize your question.Images being seen as duplicate content/pages
My images suddenly are appearing in my crawl reports as duplicate content, without meta tags, this happened over night and cant figure out why.
On-Page Optimization | | RBYoung0