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
-
Multiple H1s and Header Tags in Hero/Banner Images
I work on education websites, and our sites are being flagged by SEO and accessibility checkers for having multiple H1s. The home pages have the site name as an h3 in the hero image, and an aspirational headline (think: Be Like Mike) as an H1. The sub-pages have two H1s: one on the site name in the banner image, and the other on the page title. Note that the site name is very keyword-rich. If we were to remove the H1 and H3 tags from the hero/banner images, would it do any SEO harm? At the same time, we’d rewrite the H1 on the home page to be more keyword-focused. Any other options? I also read that it’s OK to have multiple H1s as long as it’s clear which H1 belongs to the heading area and which one belongs to the body area of the page. Thanks in advance!
On-Page Optimization | | UWPCE0 -
In seo is it nesseccary ro optimize images as well?
Is it right Image optimization creates many advantages such as better user experience, faster page load times, and additional ranking opportunities. And, it's becoming an increasingly more important role in the website? Because I start a blog https://coinmasterfreespinslinks.com/ and need your suggestions seniors. Thanks!
On-Page Optimization | | adsdsadsacd0 -
How many images should be optimised for 1 keyword?
Hello Moz, I have a product category page and I have optimised 4 images around 1 keyword - is this bad practice? I worry Google will penalise me. Should I instead optimise them for other keywords? Cheers
On-Page Optimization | | crocman0 -
How to deal with hundreds of externally-generated images with no alt text?
Hi all This is a good one. I work for a webdev company who has clients in the transport industry. Part of our work on their sites involves pulling in transport-related offers from a feed. This includes both text and images, which our site template turns into viewable pages. The problem is that Moz has flagged that these images don't come with alt text, and there are _hundreds and hundreds of them. _I can't add alt text to them all, there just isn't the time or resources. Besides, the list is updated frequently, and new images are pulled in. So... what do? Would it be prudent to noindex them all by default setting? I'm stuck! Many thanks,
On-Page Optimization | | tomcowles
Tom0 -
Is the HTML content inside an image slideshow of a website crawled by Google?
I am building a website for a client and i am in a dilemma whether to go for an image slideshow with HTML content on the slides or go for a static full size image on the homepage. My concern is that HTML content on the slideshow may not get crawled by Google and hence may not be SEO friendly.
On-Page Optimization | | aravinn0 -
Does Google penalize a page with the image tag with alt and without src?
Hi, I am curious whether Google penalizes a page with the image tag with a value in the "alt" attribute and without one in the "src" attribute? Would this count as stuffing? Sometimes you cannot put an image but you would like to get SEO benefit by having a keyword in an image?
On-Page Optimization | | Plivo0 -
Image Tags And Titles
Hi, I am currently revamping my website with a new look. Some questions i have with regards to the images found on a page. I know that we need an alt tag for each image. This should not be keyword spammed. However, what about the title tag for the image? What is the best practice for image title tags? Should it be the same as the alt tag? Should it be different? Should I leave it blank? If I am running a wordpress platform for my website. The defaulted settings for wordpress is that all images inside a post are clickable. When clicked, the page loads from abcdef.com/page/ to abcdef.com/page/image.jpg. This seems to be generating alot of internal links but I don't see the value of loading an image when my visitors click on that. Should I let the image be clickable or remove the link on the image for best SEO practices? Thanks for your advice. paul
On-Page Optimization | | paulgian1 -
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