Using Javascript to Display Responsive Images?
-
Hi
We're making our new website responsive and are thinking of using a solution that would resize the images using javascript.
So the image would be displayed like this <
div data-src="/img/200x100.png">div>
depending on what size fits the screen
Is is okay for SEO? Or do we also need a fall back that doesn't use javascript?
Thanks
-
It would be generally recommended you also include a
<noscript><img src=""></noscript>
section for crawlers and other visitors without JavaScript turned on. I would have at least hoped your solution would use the element rather than a completely non-standard
approach to display images.
Not sure what library, provider or script you are using but maybe check out a responsive image service like Pixtulate who would actually allow you to use a standard img tag and still accomplish what you are looking to do.
-
Google's not great at crawling java but its getting better however if its for images Google's not super great at images either so if you make good use of the alt tag you should be good for helping Google work out its a photo etc.
I would more think of a fallback for if the user doesn't have java installed etc.
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
-
Google lists eBay.au number one for vertical garden and their sellers are using my IMAGES
Is there anyway of getting Google to slap eBay with a loss of page rank ? eBay.au has number one position for vertical garden in google.com.au. (search 9000). Fair enough I suppose because they are delivering a huge range of vertical garden products BUT the sellers are using images for their products that are not showing their products. Most of the sellers are flogging China copies - and I mean these are really bad copies. But what angers me even more is some of their top sellers are using MY IMAGES. They have taken my images used on a UK website and have reused them in AUstralia. Sellers have even rebranded my images. GRRRRR Is there some international sin bin where I can name and shame? Does Google care about such matters?
Technical SEO | | GardenBeet0 -
Should I Use Two Domains for Multi Language Sites?
I have an immigration attorney that wants a website in English and another in Spanish. We're going to have some of the website content from the English site translated via a translator to make it true, conversation spanish (automatic translators are good, but not perfect, and we want perfect). So my question is do you think we should use two different domains (englishsite.com, spanishsite.com), a subdomain (spanishsite.englishsite.com) or maybe just a separate section of the regular site (englishsite.com/spanishcontent)? My thought would be either a subdomain or a separate section so that we're not splitting PR.
Technical SEO | | atstickel120 -
Image Alt Text: Do I Need to Link my Image for it to Count?
Hi I learned from a very senior SEO that I must link my images if I want Google to read my alt tag for my images. I don't believe this though... is it true? If the answer is not true (which I suppose it is), then maybe you can help me answer this: 1. was he confused or why would he tell me this? 2. i didn't know what i should do so now, whenever i embed an image on my blog posts, i just link them to the blog post in which the image shows... in essence, by clicking the image, the page gets refreshed. does this sound like a good strategy for images? thanks in advance!!!
Technical SEO | | seo.owl0 -
Would using javascript onclick functions to override href target be ok?
Hi all, I am currently working on a new search facility for me ecommerce site... it has very quickly dawned on me that this new facility is far better than my standard product pages - from a user point of view - i.e lots of product attributes for customers to find what they need faster, ability to compare products etc... All in all just better. BUT NO SEO VALUE!!! i want to use this search facility instead of my category/product pages... however as they are search pages i have "robots noindex them" and dont think its wise to change that... I have spoken to the developers of this software and they suggested i could use some javascript in the navigation to change the onlclick function to take the user to the search equivelant of the page... They said this way my normal pages are the ones that are still indexed by google etc, but the user has the benefit of using the improved search pages... This sounds perfect, however it also sounds a little deceptive... and i know google has loads of rules about these kinds of things, the last thing i want is to get any kind of penalty or any negative reaction from an SEO point of view... I am only considering this as it will improve the user experience on my website... Can any one advise if this is OK, or a "no no"... P.s for those wondering i use an "off the shelf" cart system and it would cost me an arm and a leg to have these features built into my actual category / product pages.
Technical SEO | | isntworkdull0 -
Should I rename URLs to use hyphens instead of underscores?
Hello. We are about to launch a redesigned and significantly expanded site that has traditionally used underscores as separators between words in its URLs. Would you recommend replacing all the underscores with hyphens? That would then require many 301 redirects to maintain any links that might be out there. Thank you!
Technical SEO | | nyc-seo0 -
What if I point my canonicals to a URL version that is not used in internal links
My web developer has pointed the "good" URLs that I use in my internal link structure (top-nav/footer) to another duplicate version of my pages. Now the URLs that receive all the canonical link value are not the ones I use on my website. is this a problem and why??? In theory the implementation is good because both have equal content. But does it harm my link equity if it directs to a URL which is not included in my internal link architecture.
Technical SEO | | DeptAgency0 -
Has anyone used prbuzz.com for pr distribution?
Has anyone used prbuzz.com for pr distribution in an effort to boost SEO? I am attracted to their unlimited distribution for 1 price for the year. Does anyone have an opinion and or suggestion of another company. Thanks!
Technical SEO | | entourage2120 -
Image map crawlability
Hey Mozzer's, I'm reviewing a moving site which utilizes an image map for their service areas. As I'm new to image mapping how should I diagnose them for crawlability, effectiveness, code (which appears correct using HTML & alt text tag), what should I be looking for, etc? I'm trying to determine the effectiveness of the image map links compared to including some regular lateral links on the page. Page: http://bit.ly/KOOtgN Thanks in advance for all advice and insights.
Technical SEO | | Bragg0