Mobile app version of vmapp.org
Login or Join
Annie201

: If I used CSS to size an image, would google understand the new size? Say I have this html code (replace x and y with actual numbers): <html> <head> <style>

@Annie201

Posted in: #Css #Html #Images #ResponsiveWebdesign #Size

Say I have this html code (replace x and y with actual numbers):

<html>
<head>
<style>
IMG {width: 100%;height: auto; max-width:xpx; max-height:ypx;}
</style>
</head>
<body>
<img src="image.jpg" width=x height=y>
</body>
</html>


It automatically sizes the image based on the user's screen size if the screen size is smaller than x by y pixels. Would google's bot recognize the css and believe I'm sizing the image properly or does it not have enough intelligence to do that and just downright assume the image is x by y pixels no matter what?

I'm asking because I don't want to run into any penalties about width being too large especially on my mobile site.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Annie201

1 Comments

Sorted by latest first Latest Oldest Best

 

@Jessie594

I agree with all the comments made about SEO being to highly focused on over other webmastering tasks however in answer to your question...

As long as you do not have any robots.txt rules which block access to your CSS, or the CSS in question is on the page or inline you won't have any issues. Putting aside concerns of penalties, which would not happen under these circumstances, Google has for a long time now been able to effectively see the page as a end user would thanks to the fact that the bots use any discovered CSS and javascript in the indexing process. So if you have CSS which resizes an image the Googlebot will detect this and treat the image being displayed in the browser as the size set in CSS.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme