Are you building an online store? Then you need to take care of your image while coding to render your webfaster to have a scuccesful ecommerce buisness. Images often take lot of time to be downloaded and occupy lot of visual space on the page, so optimisation of images play a major role in rendering page very fast. If the images are handled properly in the page the client side banwidth would be less and you can render your useful content fast. Now lets start our discussion on how to handle image to make browser download and render fast.
First thing before using image we should think whether image is really required? Can we replace image by css3 effects or using webfonts or css polygon. Eliminate wherever image is not required. Then cut down the possiblity of using image by alternative techniques like using webfont, css3 effects and css polygons. Css3 features like gradient shadows zoom level can provide alternate for image. Use of css polygons cuts down the usage of polygon like icon images used on pages.
Be careful while choosing the type of image as it is important to choose right type of image.
JPEG (or .jpg) images are standard image of the Internet. JPEG images are able to be compressed considerably, which results in quality images with small file sizes.
GIFs (.gif) are lower quality images than JPEGs and are used for more simple images such as icons and decorative images. GIFs also support animation. Regarding image optimization, it's great to use GIFs for the plain and simple images on a webpage.
PNG images are becoming more popular as an alternative to GIFs. PNGs support many more colors than GIFs, and they don't degrade over time with re-saves like JPEGs. Even though the PNG file type is starting to be used more, the file sizes can still be much larger than what you would find with JPEG images. So use JPEG in common and for simple small and animation images use GIFs and for tranperant images use PNGs.
Consider using alt in tags as they are altenative for image and use proper keyword for alt as it adds SEO value . When you hover image you will find the keyword which adds to SEO so consider the keyword while using it.
Use sprite image while you have lots of icons and small images in your web page.
Lazy loading of images filter defers loading of images until they become visible in the client's viewport or the page's onload event fires. This avoids blocking the download of other critical resources necessary for rendering the above the fold section of the page. You can do this by adding a data-attribute in img tag which would be the actual image and use a gif(loading) url in the src of th image tag . onload replace src by data-attribute.
While in design phase you can considering using pagination so that it wont be a high load for page to load all image at one set for ecommerce sites. Pagination you divide images into different pages and load image required for the current page. Which would improve page load.
First thing before using image we should think whether image is really required? Can we replace image by css3 effects or using webfonts or css polygon. Eliminate wherever image is not required. Then cut down the possiblity of using image by alternative techniques like using webfont, css3 effects and css polygons. Css3 features like gradient shadows zoom level can provide alternate for image. Use of css polygons cuts down the usage of polygon like icon images used on pages.
Be careful while choosing the type of image as it is important to choose right type of image.
JPEG (or .jpg) images are standard image of the Internet. JPEG images are able to be compressed considerably, which results in quality images with small file sizes.
GIFs (.gif) are lower quality images than JPEGs and are used for more simple images such as icons and decorative images. GIFs also support animation. Regarding image optimization, it's great to use GIFs for the plain and simple images on a webpage.
PNG images are becoming more popular as an alternative to GIFs. PNGs support many more colors than GIFs, and they don't degrade over time with re-saves like JPEGs. Even though the PNG file type is starting to be used more, the file sizes can still be much larger than what you would find with JPEG images. So use JPEG in common and for simple small and animation images use GIFs and for tranperant images use PNGs.
Consider using alt in tags as they are altenative for image and use proper keyword for alt as it adds SEO value . When you hover image you will find the keyword which adds to SEO so consider the keyword while using it.
Use sprite image while you have lots of icons and small images in your web page.
Lazy loading of images filter defers loading of images until they become visible in the client's viewport or the page's onload event fires. This avoids blocking the download of other critical resources necessary for rendering the above the fold section of the page. You can do this by adding a data-attribute in img tag which would be the actual image and use a gif(loading) url in the src of th image tag . onload replace src by data-attribute.
While in design phase you can considering using pagination so that it wont be a high load for page to load all image at one set for ecommerce sites. Pagination you divide images into different pages and load image required for the current page. Which would improve page load.
Thanks Immanuel
ReplyDelete