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
-
Optimizing images and more for page speed
Hey everyone! I run a comparison/affiliate site for men's clothing. On the side of that, I have a Squarespace site for inspiration, articles and outfit pictures. I've tried to optimize site speed for the Squarespace site without much success. I've run all pictures trough JPEGmini to decrease file size but it doesn't seem to be enough. Below I attached the result I got when I run one of the pages trough Lighthouse and GTmetrix. Do you have recommendations of what I can do to improve the results? Is it a good idea to use next-gen formats for pictures as Google suggests as an example? Kind regards,
On-Page Optimization | | JonastriesSEO
Jonas XU131T0.png sPD3w13.png1 -
Responsive site.com vs m.site.com
Hi All, My client's website have two urls like: site.com/a.html and **m.site.com/a.html. ** Will it hurt google rankings for this website because there are version of a website? Please help!
On-Page Optimization | | binhlai1 -
NOINDEX, FOLLOW on product page - how about images indexing?
Hi, Since we have a lot of similar products with duplicate descriptions, I decided to NOINDEX, FOLLOW most of these different variants which have duplicate content. However, I guess it would be useful in marketing terms if Google image search still listed the images of the products in image search. How does the image search of Google actually work - does it read the NOINDEX on the product page and therefore skip the image also or is the image search completely dependent on the ALT tag of any image found on our site? Thanks!
On-Page Optimization | | speedbird12290 -
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 -
Image alt tags shouldn't contain keywords?
Hi Everyone, I've been informed recently that keyword within your image alt tags can be a trigger for penguin if you have your keyword mentioned too often on the page (over-optimisation). I'm not sure I understand why though, the reason for this is, we have a page which features a picture and a description of a product. The page title, heading, a mention in content and image alt all contain a keyword which is the product name. I've been told to remove these alt tags but aren't alt tags important for screen readers and other W3C complacency issues, so removing the product names from the alt (which also happens to be the keyword for the product pages but is best describing what the image is) would make these image useless to users with certain disabilities, so if its true that doing this can be a negative signal isn't this breaking googles guidelines by not providing good content for those users? Would it be better to remove these alt tags or attempt to remove keyword elsewhere on the page? or can anyone suggest something else? Thanks in advance.
On-Page Optimization | | AMA-DataSet0 -
Image Alt For Logo
I've just run an on page audit of my website www.octopus-hr.co.uk and it seems in reasonable shape. However, I wonder whether I'm missing a trick with the Image Alt for my company logo. The logo appears on every page and links back to the home page. Currently the Alt tag is just the Company name "Octopus". We develop HR Software and we would love to rank better for the term "HR Software". Is it legitimate to change the alt tag to "Octopus HR Software" for my logo or is considered spam and likely to get us hit with a penalty? Thanks in advance David
On-Page Optimization | | davidoff5744440 -
Seo'ing Sub domains for images
We are currently adding some performance improvement to our websites, to improve user experience. One of the things we are looking at is splitting of images over several sub-domains, to increase the number of images that can be downloaded at the same. We have seen that using key phrases within image names has an improvement in rankings. So, the question is should we create sub-domains as key-phrase.example.co.uk or as i1.example.co.uk? K
On-Page Optimization | | soltec0 -
Image files names - should each be different ?
Hi SEOs I have created a page on my website with a certain tutorial - let's say "How to change a tyre in your car". I have Grade A from On-page report using SEOmoz tool. I have put a relevant alt description for each photo I have put in that tutorial and I have used relevant keyword as a name for each image. So for example this would look like that: changing-tyre-1.jpg changing-tyre-2.jpg My question is should I name these file differently according to their content ? For example if on my photo there is some tool I have to use to change the tyre should the file have the name relevant to the subject of the article/tutorial on the page or to the content of the image ? Is that a stupid question ? Or am I getting too fussy ? Thanks
On-Page Optimization | | lolskizz0