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)
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 -
Clickable Images Question
This may seem like a minor issue but it is something that has been bothering me. When I write a blog post and place images within the text, is it better to have the image linking to nothing or link to the image url. I am guessing that unless I wish the image to rank for a certain keyword then it is not worth it linking to the image url. But would just like clarification if there is a more deep seated reason. Thanks Mark
On-Page Optimization | | markmiton0 -
Ranking for a word when your image is showing up as #2?
I'm trying to rank for several specific words in my industry. I've noticed that many of the pages I'm trying to rank for the specific words, the main image of the page is being ranked. So my question is should I still try to rank my page even though the image is ranking as the first image displayed in the google results. Will this count against me by Google if I do? Or should I try to make the image being ranked more enticing for google searchers to try to increase traffic? Right now the images are not generating many clicks.
On-Page Optimization | | mr_w0 -
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 -
How do you check if press release images are different enough?
We're helping a Sydney blog called Happy develop their local following and we're starting by ensuring their posts are optimized. They're doing a great job with reviews and content but the one thing we noticed is that all the images they use (because they review music) are from bands and artists that are used tens if not hundreds of times in other places. We're trying to set up a simple way for them to tweak these images to ensure they're crawled and seen as original. Anyone had to deal with this and found a solution that makes sense?
On-Page Optimization | | wearehappymedia0 -
SEO Location Pages - ALT Image Tag Question
Hello Guru's, I have a Hire Website whereby you can rent products online. I have created different Location pages for these which are in essence the same pages page but with different location specific urls, title tags , on page content etc etc. This helps me to rank for local search. These location pages also display 20 products per page. My question is Should I make the ALT IMAGE TEXT location specific for each of the 20 products . Example - Steam Cleaner Rental in "location" or should I only amend a few of the Atl Image Texts to be location specific. I don't want to come accross as spammy in google eyes but I also don't want to be seen as having duplicate content , images etc etc What do you think ? thanks Sarah.
On-Page Optimization | | SarahCollins0 -
Pagination for image galleries
We have photo galleries that load new URLs with new content/photo on each page, yet I'm still seeing "duplicate meta description" in GWT for each separate URL in the gallery. Will rel="next" rel="prev" take care of this? Just want to confirm as it requires a CMS upgrade/release.
On-Page Optimization | | Aggie0 -
Nofollow images to sculpt internal anchor tags
One of my client tags image-links with nofollow if those links are before a regular HTML link in the source code, e.g.:
On-Page Optimization | | Sebes
.
.
.
Check our page aboutreally cool shoes. They do this to "better pass anchor tags" to the page /page-about-shoes.html. My question: Is this a good practice to do? Thanks Sebes0