Screpy SEO platform logo New Screpy is coming 🎉

Image Size Responsive

To maximize the user experience and increase your SEO score, it is extremely important that the images on your web page are responsive. Here are some methods!

Reviewed by Screpy Editorial Team

How Can I Do Image Size Responsive?

In order for images to be responsive, you can choose the following methods:

Using width property

You can first use the width property. When you choose this, you will prefer the height to be automatically adjusted based on the device used or other responsive requirements. In this way, the visual will be scaled to be responsive and presented to the user in this way. You can use the following code for this

img { width: 100%; height: auto; }

We would like to tell you that when you use the code above, the image will not remain at its original size. That is, it may become smaller or larger. In this case, using max-width is seen by many as a “better solution”.

Using max-width property

Setting the value of max-width: 100px percent writes new rules for generating a responsive display. If the image to be rescaled to be responsive will be much larger than the original, this code prevents this. But the image still has the ability to be smaller. Use the code below for this:

img { max-width: 100%; height: auto; }

Srcset to improve loading time

If you want to improve the loading time of the image on your web page, you can make a change to the page width in order to increase the speed on mobile. Srcset, which is an extremely good option for use in modern search engines, do exactly that. Combine the srcset command with the <picture> tag. Here is an example:

Image Size Responsive technical SEO task example from Screpy

You can easily load smaller images on your web page for your mobile visitors by using scrcet.

Object-fit both for images and videos

It is a very popular code that allows any visual or video to easily fit into its container. When you use this, you can choose to preserve the aspect ratio, or you can stretch and resize as many images as you like.

Here is an example for object-fit code:

.myImg { object-fit: cover; width: 320px; height: 180px; }

object-fit is an extremely practical code, but it has a minor drawback. This code may not work in Internet Explorer and older versions of Safari.

Related tasks

Solve the errors logged to the console

If there are error warnings about your website within the console offered by the browser, you need to follow a few basic steps to resolve them.

Tuesday, December 22, 2020

Title Tags Not Found

Are you encountering the title meta tag not found the issue? You can solve it right away! Here are the causes and importance of the problem in detail.

Sunday, December 20, 2020

Robots.txt Not Found

If you are encountering the Robots.txt not found error, you can create your file immediately by paying attention to the steps below. Discover the details now!

Sunday, December 20, 2020

Not Crawlable Pages

Have the same problem with crawlability issues? Let’s see what you can do for your website to be indexed. Here are the ways and solutions!

Sunday, December 20, 2020

Meta Description Not Found

Are you getting a meta description not found a warning about your web page? Let's figure it out! Why is meta description important, how to pass the audit? Examine!

Sunday, December 20, 2020