A picture is worth a thousand words. These proverbs are true for normal homo sapiens, but if you are seo then there is a proverb for you. A picture is worth 150 thousand words.
If you replace a picture of 300 Kb, then you can write 150,000 words, the size of both will remain the same, pictures are one of the most heavy elements of the website but it is also necessary to use them. Don't stay and don't suffer.
150,000 characters = 300 KB ✔
Google has now pushed the page experience update on the desktop as well, the marial (scranny) healthy website will no longer work.
So in today's tutorial we will see 10 such steps, 10 such points, by following which you can increase the performance of your website without deleting the images of your website. The effect of the size of the images can be reduced on the website.
Many business categories are such that it is necessary to use more images, like wedding photographers, if they do not show more and more photos on their website, they will show them by reading the mantra.😁
So let's see these steps but before that we will see how you have to know the issues of your images. One of the best tools, free tools, is GTmetrix. GTmetrix analyzes the images of your website very closely and not only tells the problem but also tells their solution.
POINT 01 : RESIZE WELL ✔
Now the first step to optimize images is to control their size (Kb-mb size not pixel size).
Obviously you can resize the images through css but if you resize the right images in advance then you can avoid an extra error but what is the correct size after all.
So, you resize the images of your website according to this size chart and then use.
POINT 02 : LAZYLOAD IMAGES ✔
Lazyload means to load the images only when they are actually needed. By the way, WordPress has now started lazyload images natively, so you do not need to use any plugins for this, but still there may be an issue of lazyload images in your website.
See, there are two ways to display images in a website.
1 - Normal Image Element
2 - Background Image Element
These background images are not lazyloaded in this option in Native Lazyload, so these issues with lazyload keep coming in your website, showing error.
Well, when you show an image normally in a webpage, you use the image src element, as soon as the browser sees the img-src, it starts loading the images from that url, lazyload plugins or script this src as data- Let's change from src.
So, the browser does not even know that there is an image here, but as soon as the user scrolls the page and this data-src element comes in the view port, your script or plugin again changes this data-src to src. And the browser starts showing the image by downloading it.
Now, img-src is not used in the background images, so lazyload does not work, so for its solution, we use different plugins that actively manipulate this background-image. If you search background-image lazyload in wordpress then you will find many plugins which provide this solution for free.
POINT 03 : Encode Effectively ✔
To encode images effectively, here we are talking about Kb-Mb, an image can be unnecessary heavy even though it is only 500/500 pixels, what can be its solution.
How To Compress Images ❓
1 》Manually compress images using tools.
( ie. Google's Squoosh.app )
2 》Use image editing tools like photoshop or photopea.com
3 》Use Plugins. ( if you are using WordPress )
4 》Use scripts to compress automatically.
POINT 04 : USE IMAGE CDN ✔
By loading images through CDN, you can remove a lot of load from your servers and increase the performance of the website.
POINT 05 : AVOID REDIRECTS ✔
Here http, http://www, https, https://www are all different urls.
So, if your website is running on https version but https://www is being used in the url of the images, then the images will appear in your website but the images will come from a long way.
In such a situation, the speed of the website will be affected, its solution is to use only a particular url format. If your website is running on https://www, then the url of the images should also be https://www.
If the website is running on https:// then the url of the images should also be https://, and if the website is running on http then leave the images first, install the SSL certificate, it is more important. 😂
How will you solve this issue? It is very simple if your website is custom coded then you can use find and replace command. Happens in any editor, suppose your website is running only on https, then in the find section you will put https://www. ( Your website url )
Put https in replace and after that do your domain and replace all. Wherever there is www, https will come there and www will be removed, if your website is on wordpress, then you can use better search and replace plugins, it will also take the same fundamentals.
POINT 06 : USE CSS IMAGE SPRITES ✔
Whenever too many small icons appear on your website, no matter how much you have reduced the size of these icons, they still affect the performance because let's say that you have 15 icons of 10-10 kilobites. The total weight will be only 150 kilobites but the website will have to process the 15th request. Css sprites combine these 15 icons into one. So your website has to handle only one request, in WordPress again you will get many plugins to generate Css sprite and in custom coded website you can eat developer's life.
POINT 07 : AVOID EMBEDDING ✔
Images from other sites should not be embedded in your website, it is not just about size, it is an extra request, if you want to load an image from a third party site, then you can download it and upload it directly to your site, size The request will remain the same. Embedding is a more costly option.
POINT 08 : DELETE EXIF DATA ✔ (META DATA)
Whenever you take a photo, location, camera, aperture, focal distance are all the information that the visitor of your website does not need. So you can safely remove it, most image optimization, plugins or scripts remove this data automatically but if you are still visible in images then make sure that you have EXIF data in your image optimization plugins. The related setting has been turned on. Like, if this setting is not ticked in the short pixel plugin, then the Exif data will not be removed.
You do not save a lot by removing the exif data from the images, but there is a slight difference when the high level optimization is reached. And when it comes to gain point by removing only exif data, then it should be removed.
POINT 09 : DISABLE HOTLINKING ✔
On 7th point I said that you should not embed images in your website, but what if other people are embedding images from your website. The bandwidth of your website is also being spent and at the same time the load on your server is increasing, which will result in slowing down of your website. That's why you have to turn off the embedding of images from your website i.e. HOTLINKING, you can achieve this with any plugin in wordpress.
To simply change the .htaccess file, you can stop the hotlinking of images, you just have to paste this code in your .htaccess file.
POINT 10 : IMAGE DIMENSIONS ✔
It is important to have the correct size of the image in the css, this saves the guess work of the browser and it means that your CLS score does not deteriorate. In WordPress, most builders automatically add this value, but in the custom develop website, you have to see all your images, pay attention to whether the specification should be given to the width and height in any image has not been missed. If this is the case, then fix it, thankfully this issue does not come in WordPress until you start manually coding the images yourself.
So, these were those 10 points by covering which you can be sure that the website will not slow down because of your images and the page experience score of the website will not be down because of the images.
Thanks For Vising Our Site 💚
Also read :