image optimisation - finding the right resolution

CONTENTS:

Choose the Right Image Format

Image Compression

Image Dimensions

Lazy Loading

Image Optimisation Plugins/Tools

Alternative (“Alt”) Text

Image Sitemaps

Image CDN (Content Delivery Network)

File Naming

Image Compression Tools

Minimise the Use of Decorative Images

Progressive Loading

Cache Control

Image Sprites

Monitor Performance

Optimising images for the best user experience on a website is crucial because images can significantly impact page load times, user engagement, and overall satisfaction. For the same reasons image optimisation is an essential part of any basic SEO strategy because what affects user experience also impacts rankings. Here are several ways to optimise images for a better user experience and higher rankings in organic search:

Choose the Right Image Format

Use the appropriate image format for the content. Common formats include JPEG for photographs and images with many colours, PNG for images with transparency and which have a text component, and SVG for vector graphics. Also consider using WebP, a modern image format that provides high-quality compression and is supported by most modern browsers.

Image Compression

Compress images to reduce their file size while maintaining image quality that is still good on a computer screen or mobile device. General images viewed online do not have to be of the highest resolution. You can use various tools and software, such as Adobe Photoshop, online services like TinyPNG or WordPress plugins, to compress images. The aim is to find the right balance between file size and image quality.

Image compression is a process that reduces the file size of digital images while attempting to maintain acceptable image quality. It is commonly used in various applications, including web design, photography, video streaming, and more, to save storage space and reduce the time it takes to transmit or load images. Image compression works by eliminating redundancy and minimising unnecessary data in an image while preserving as much detail as possible. There are two primary types of image compression: lossless and lossy.

Lossless Compression

Lossless compression reduces file size without any loss of image quality. It’s typically used for images where pixel-perfect accuracy is essential, such as medical images, technical drawings, or some text-based graphics.

Lossless compression algorithms analyse the image data to identify patterns and redundancies and then encode the image in a more efficient way. Common lossless formats include PNG, GIF, and some variations of the TIFF format. When the compressed image is decompressed, it is identical to the original, making lossless compression ideal for preserving image fidelity. However, it may not achieve as much compression as lossy methods.

Lossy Compression

Lossy compression reduces file size by selectively discarding some image data that is considered less essential, which can lead to a loss of quality. It’s commonly used for photographs and images where some level of quality degradation is acceptable.

Lossy compression algorithms analyse the image and identify areas where data can be discarded without a significant impact on the perceived image quality. They then apply various techniques like subsampling to achieve compression. Common lossy image formats include JPEG and WebP. When an image is compressed using lossy methods, some data is permanently lost. However, you can control the level of compression to balance file size and image quality.

Most lossy image compression formats allow you to adjust the compression level, providing a trade-off between image quality and file size. Higher compression levels result in smaller file sizes but may reduce image quality.

The process of image compression involves several key techniques, including:

  • Quantization: Reducing the number of colours or levels of intensity in an image. This is commonly used in lossy compression to reduce file size.
  • Huffman Coding: Creating a more efficient representation of image data by assigning shorter codes to more frequently occurring values.
  • Run-Length Encoding: Replacing sequences of identical values with a code that represents the length and value, which is particularly useful for binary images.
  • Discrete Cosine Transform (DCT): A mathematical technique used in JPEG compression to transform the image into frequency components, allowing for compression of less essential high-frequency data.
  • Subsampling: Reducing the amount of colour information in the image by sampling colour channels less frequently. This is commonly used in lossy compression, especially for photographs.

Overall, image compression is a valuable technique for reducing the size of image files, which is particularly important for web pages, where smaller file sizes lead to faster loading times. The choice between lossless and lossy compression depends on the specific requirements of the image and its intended use.

Image Dimensions

Always resize images to the exact dimensions they will be displayed on your website. Avoid using larger images and relying on HTML/CSS to resize them, as this can slow down page loading. Also use responsive image techniques to serve different image sizes based on the user’s device and screen size.

optimising images for a new website

Lazy Loading

Lazy loading is a web development technique that defers the loading of non-essential resources, such as images, videos, and other multimedia content, until they are needed by the user. Instead of loading all assets when the web page loads, lazy loading loads these assets as the user scrolls down the page or interacts with specific elements. This approach improves a website’s performance, reduces load times, and enhances the user experience in several ways:

  • Faster Initial Page Load: Lazy loading allows the core content of a web page to load quickly, even on slower connections or devices, because non-essential assets are loaded only when the user requests them. This results in a faster initial page load, reducing bounce rates and improving user engagement.
  • Reduced Data Usage: By loading assets on-demand, lazy loading can significantly reduce data consumption, which is essential for mobile users with limited data plans. It helps conserve bandwidth and lowers data costs for both users and website owners.
  • Improved Page Performance: Delaying the loading of heavy images and videos until they are visible on the screen reduces the strain on the user’s device and the server, resulting in smoother interactions and faster rendering.
  • Better User Experience: Users don’t have to wait for all the page’s elements to load before they can start interacting with the content. This creates a more responsive and enjoyable browsing experience.
  • Search Engine Optimisation (SEO): Search engines take into account page load times and user experience when ranking websites. Faster load times and improved user experience through lazy loading can indirectly benefit your site’s SEO.
  • Reduced Bounce Rate: When users encounter long loading times, they are more likely to leave a website before it fully loads. Lazy loading reduces the initial load time, making it less likely that users will abandon the page, resulting in a lower bounce rate.

To implement lazy loading on a website, you can use JavaScript libraries or native HTML attributes, depending on your web development platform and requirements. Many content management systems (CMS), such as WordPress, and web development frameworks have built-in support for lazy loading.

Image Optimisation Plugins/Tools

Use image optimisation plugins or tools that automatically optimise and resize images as you upload them to your website. Many CMS platforms, such as WordPress, have plugins or extensions for this purpose.

Alternative (“Alt”) Text

Always include descriptive alternative or “alt text” for images. Alt text is crucial for accessibility and SEO. It provides a textual description of the image in case it cannot be displayed or is read by screen reader software for people who are visually impaired.

Image Sitemaps

Include images in your XML sitemap to help search engines discover and index them. This can improve your website’s visibility in image search results. So if images are important for your business this could help you reach a wider audience.

content delivery network for web images

Image CDN (Content Delivery Network)

A Content Delivery Network (CDN) is a distributed network of servers strategically located in various geographic locations around the world. CDNs are designed to deliver web content, such as web pages, images, videos, scripts, and other assets, to users more efficiently and reliably. They work by caching and serving content from the server that is geographically closest to the user, reducing the physical distance that data must travel and improving the overall user experience. Here are some key benefits of using a CDN:

  • Faster Content Delivery: CDNs reduce the physical distance between the user and the server, which minimizes latency and improves the speed of content delivery. This results in faster page load times, which is critical for a positive user experience.
  • Improved Website Performance: By offloading the delivery of static assets to a CDN, your web server can focus on processing dynamic content, reducing server load and improving overall website performance and responsiveness.
  • High Availability and Redundancy: CDNs often have multiple servers and data centres, ensuring high availability and redundancy. If one server or data centre experiences issues, the CDN can seamlessly route traffic to another server, minimising downtime.
  • Traffic Load Balancing: CDNs distribute web traffic across multiple servers, which helps prevent overloading a single server during traffic spikes. This load balancing ensures that your website can handle high volumes of traffic without performance degradation.
  • Distributed Security: Many CDNs provide DDoS (Distributed Denial of Service) protection and security features to mitigate common web threats. By filtering malicious traffic and attacks at the CDN’s servers, your origin server remains protected.
  • Global Reach: CDNs have servers in multiple geographic locations, allowing your content to be served to users around the world from their nearest server. This results in consistent performance for a global audience.
  • Bandwidth Savings: CDNs can save on hosting and bandwidth costs because they offload a significant portion of the content delivery. This can be especially cost-effective for websites with high traffic or media-heavy content.
  • SEO Benefits: Faster load times, which CDNs often provide, can positively impact search engine rankings. Search engines like Google consider page load speed as a ranking factor, making CDNs a valuable tool for SEO.
  • Mobile Optimisation: With the rise in mobile browsing, CDNs can help optimise content delivery for mobile users by minimising data transfer and ensuring a responsive design.
  • Content Caching: CDNs use caching to store copies of your content. Cached content can be served quickly to repeat visitors, further improving page load times.
  • Scalability: CDNs are designed to handle traffic spikes and can scale easily. This is particularly valuable for websites that experience fluctuations in traffic or sudden surges.

Popular CDN providers include Cloudflare, Akamai and Fastly, among others. To use a CDN, you typically set up DNS (Domain Name System) configurations to route traffic through the CDN’s network. Many CDNs offer various features and customisation options, allowing website owners to tailor their content delivery strategy to their specific needs.

File Naming

Always use descriptive file names for your images that reflect their content. This can improve SEO and help users understand what the image is about. It can also save time because many CMS systems will automatically set the image title to the same as the image filename so there is no need to set this up manually every time a new image is uploaded to a website.

Image Compression Tools

Optimise your images using tools like ImageMagick, OptiPNG, or JPEGoptim to further reduce their file size without compromising quality.

Minimise the Use of Decorative Images

Limit the use of decorative images that don’t add substantial content to your web pages. This reduces unnecessary load times.

Progressive Loading

Progressive loading, also known as progressive rendering, is a technique used to improve the perceived loading speed of images and other media on web pages. It works by initially displaying a low-resolution or blurry version of an image and then gradually refining the image’s quality as more data is downloaded. This approach enhances the user experience by providing visual feedback that the content is loading and ensuring that users can interact with the page while waiting for the full-resolution image to load. Progressive loading is particularly useful for images because it:

  • Reduces Perceived Load Time: By showing a low-resolution image quickly, users get immediate visual feedback that content is loading, making the wait time feel shorter. This enhances user satisfaction and engagement, as users are less likely to abandon the page due to slow loading.
  • Improves User Experience: Users can start interacting with the page and consuming content while the higher-quality image continues to load. This creates a more interactive and responsive browsing experience.
  • Enhances Mobile Performance: Progressive loading is beneficial for mobile users, as it minimises the wait time before users can view and interact with the content. On slower mobile connections, this can be especially valuable
  • Optimises Performance on Slow Connections: Users with slower internet connections, such as those in remote areas or on mobile networks, may experience delays when loading high-resolution images. Progressive loading ensures that the most critical content is displayed quickly and progressively improves image quality as data arrives.
  • Adapts to Varying Network Conditions: In cases where network conditions fluctuate, such as in areas with inconsistent internet connectivity, progressive loading gracefully adapts to the available bandwidth. It prioritizes the display of content that’s already loaded and incrementally improves the quality of the image as more data becomes available.
  • Supports Interactivity: Progressive loading allows users to interact with or zoom into an image before it’s fully loaded. This can be useful for applications like maps or image galleries, where users might want to explore details while the image continues to load in the background.

Cache Control

Caching is a technique used in web development to store and reuse previously fetched or computed data to improve website performance. Various forms of caching impact the user experience in different ways. Caching can have both positive and negatives impacts that need to be balanced for individual requirements and circumstances. Here are some common types of caching and their impact on user experience:

compressing images for a new website

Browser Cache

Browser caching stores resources, such as HTML, CSS, JavaScript, images, and more, locally on the user’s device after they’ve been fetched from a website. This results in faster load times for returning visitors, as the browser can retrieve resources from its local cache rather than downloading them again. It also reduces page load times and bandwidth usage. However, if cached resources are outdated, users may not see the latest content or changes on a website.

Content Delivery Network (CDN) Cache

CDNs cache website content on their servers at multiple geographic locations to serve it more efficiently to users worldwide. The effect is faster page load times due to content being served from a server closer to the user’s location. This reduces latency and enhances performance but can mean users view stale information.

Object Cache

Object caching stores database queries or processed data to reduce the need for repeated, resource-intensive calculations. This leads to faster response times for dynamic web pages, as complex operations are minimised. This results in a smoother, more responsive user experience but, on the downside, caching may return outdated data, leading to inconsistencies in dynamic content.

Page Cache

Page caching saves entire web pages in a static form to serve them without reprocessing, reducing server load and enhancing load times. The results are rapid page load times, especially for frequently visited pages. This provides a faster and more responsive browsing experience but as with all caching methods, it can present outdated content to users.

Database Cache

Database caching stores frequently accessed database queries or query results to reduce the need to query the database repeatedly. For dynamic content this results in quicker responses and better overall site performance. The risk is that incorrect date can be displayed.

Fragment Cache

Fragment caching stores just specific sections of a web page, such as widgets or dynamic content, to minimise the need to regenerate those sections. Again this results in faster load times for pages with dynamic components, but can display incorrect or stale content.

API Cache

API caching stores responses from external APIs, reducing the need to make repeated requests to external servers. This improves the speed and reliability of applications using APIs but has the same disadvantages as all caching processes in that data may become outdated or fail to reflect changes on the external server.

Image Sprites

Use image sprites for icons and small graphics. By combining multiple images into one file, you reduce the number of HTTP requests.

Monitor Performance

Regularly check your website’s performance with tools like Google PageSpeed Insights or GTmetrix, to identify and address performance issues, including image optimisation problems.

Image optimisation for web use not only enhances user experience but also contributes to faster page loading times, which can positively impact search engine rankings and overall site performance.

About Michelle Symonds

Established as an SEO specialist since 2009, following a career as a software engineer in the oil industry and investment banking. Michelle draws on her IT and web development experience to develop best-practice processes for implementing successful SEO strategies. Her pro-active approach to SEO enables organisations to raise their online profile and reach new audiences, both nationally and internationally. She has a wealth of cross-industry experience from startups to Fortune 500 companies .

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.