
Melhorar Speaks Podcast
How to Optimize Images for Speed and SEO
Images can make up more than 20% of a webpage's size. When images are large and not compressed, they can slow down how fast the page loads. This can hurt important performance measurements and frustrate mobile users who have limited data plans. On the other hand, if images are optimized correctly, they can:
- Make the page load faster and improve the way content is displayed
- Help people with disabilities by using descriptive alt text
- Increase user engagement and reduce the number of people who leave the page quickly
- Bring in more visitors from Google Images and other search results
In summary, optimizing images is important for both website performance and search engine optimization (SEO).
Select the Best Image Format
Many people upload pictures without considering the format they are using. However, the format you choose can impact the file size (which affects how fast it loads), the quality of the image, how well it works in different web browsers, and how easily search engines can find it. Each format has its pros and cons. Here’s how to choose the best one:
- Use JPEG for regular photos.
- Choose PNG when you need a transparent background or want the best image quality.
- Go with WebP as your main choice if you want small file sizes and good compatibility with most devices.
- Select AVIF if you're making a modern app or website and don’t need to worry about older browsers.
Choosing the right image format can save you hundreds of kilobytes for each picture, which can really add up if you have a lot of images on your site.
Tip: Fall back gracefully to JPEG or PNG for browsers that don’t support WebP/AVIF.
Resize Images to Display Dimensions
One of the biggest mistakes people make is uploading large images that web browsers end up shrinking. For instance, a photo from your phone or DSLR camera might be 4000×3000 pixels, but your blog only displays it at 800×600 pixels. That’s more than 10 times the data you actually need, which wastes bandwidth, slows down your website, and hurts your search engine ranking.

Search engines look at how fast your page loads when deciding where to rank your site, and using oversized images can slow it down. You should only use the pixels that your design actually needs no more and no less.
Why Resizing Matters
- Faster Load Times: The browser doesn’t have to download or adjust extra data.
- Better User Experience: Smaller files mean images load faster, leading to smoother scrolling.
- Improved SEO: Google gives better rankings to sites that load quickly, especially on mobile devices.
- Lower Hosting Costs: Optimized images use less bandwidth.
How to Resize Images the Right Way
Depending on how you work (manually or automatically), there are different tools you can use. These are great for preparing images for blogs or banners:
- Squoosh.app: A free image resizer from Google that works in your browser and supports formats like WebP and AVIF.
- Photopea: A free alternative to Photoshop that’s good for resizing multiple images at once.
- Canva Pro: Lets you export images in specific sizes and formats.
Use these if you’re working in a development environment:
- gulp-image-resize: Resizes images in Gulp build processes.
- imagemin-webpack-plugin: Optimizes and resizes images in Webpack projects.
- sharp (Node.js): Fast image processing for server-side applications.
If you store your images online, you can use services that automatically resize them:
- Cloudinary: Resize images instantly using URL parameters like w800,h600.
- ImageKit, Imgix, Uploadcare: Similar services that include a built-in content delivery network (CDN) and optimization features.
If you’re making a responsive website, think about creating different sizes for each image. For example:
- 400px for mobile
- 800px for tablet
- 1200px for desktop
Then, you can use srcset and sizes in your HTML to help the browser choose the best size:
This way, mobile users won’t download a large image meant for desktops, which saves them time and data.
Compress Without Losing Quality
After you resize your images, the next step is to compress them. This means making the file size smaller without affecting the way it looks. This step is really important because even images that are the right size can be too large if they're not compressed correctly.
Image compression works by getting rid of unnecessary data. Some of this data can’t be seen by the human eye, so you can significantly reduce the file size without making the image look worse.
Two Main Types of Compression
There are two main types of image compression, and each has a different purpose:
Lossy Compression: This type removes some data permanently, usually details that most people won’t notice. It’s great for photos, backgrounds, and blog images where having perfect detail isn’t super important.
- Best formats: JPEG, WebP
- Average quality range: 70–80%
- Keeps the image looking nice while making the file size much smaller.
Lossless Compression: This type keeps all the original data intact but gets rid of extra information like metadata and invisible color layers. Use this when you need precision, like for logos, icons, or user interface elements.
- Best formats: PNG, AVIF, SVG
- The file size won’t shrink as much as with lossy compression, but the image remains 100% accurate.
Recommended Compression Tools
There are many tools that can help you compress images easily. You can use software on your computer, online tools, or automate compression in your development process.
- ImageOptim (Mac) – Just drag and drop images to compress them without losing quality. It’s great for working with a lot of images at once.
- TinyPNG – Works with PNG and JPEG files. It has smart lossy compression and an easy drag-and-drop interface.
- Kraken.io – Offers both lossy and lossless compression. Good for handling a large number of images.
All of these tools let you see how the image quality changes before and after compression, so you can compare them visually instead of just looking at the file size.
Compression Best Practices
- Start with the right format: Don’t bother compressing a PNG if a JPEG would work better.
- Aim for good visual quality: You don’t need the smallest file size possible; you want the smallest file that still looks good.
- Test in context: After compressing, check how the image looks on your site or app. If it still looks good, you’re set.
For most blog images or main visuals, setting JPEG/WebP compression to 75% quality is a good balance between clear visuals and fast loading times. If you compress too much, you might see issues like blurry edges or strange colors. Always check the image visually to make sure it looks good, not just by the numbers.
Use Semantic File Names & Alt Text
Search engines can’t “see” pixels, they read text:
- File name: red-vintage-truck-dallas.jpg
- Alt attribute: "Red vintage truck parked on Elm Street, Dallas"
People Also Ask: “What image format is best for SEO?” and “What size should images be for SEO optimization?” your answers live in your file names and alt text.
Use a CDN for Quick Image Optimization
A Content Delivery Network (CDN) does more than just deliver your website's files from a nearby server, it also improves images as they are requested. This helps your site load faster worldwide, and images are automatically adjusted for the best display on each device and browser.
Many modern CDNs can quickly change image formats. For example, if you upload a JPEG or PNG, they can convert it to smaller formats like WebP or AVIF automatically. This makes the file size smaller, so your site loads faster without you needing to do anything extra.
CDNs also allow you to change the size of images through URL parameters, so you can get the same image in different sizes based on the device’s screen or layout needs. Instead of uploading many versions of the same image, you can just upload one and resize it whenever necessary.
Another big benefit is global caching. When someone requests an image, it is stored in several data centers around the world, which makes future loads faster for everyone.
Popular CDNs with These Features:
If your site gets visitors from different areas or if you show large images like product photos, using a CDN with smart optimization can greatly improve your site’s performance.
Add Structured Data & Image Sitemaps
Search engines don’t just guess what your images are about; they rely on extra information. You can help them by adding structured data and an image sitemap.
Image Structured Data
Structured data helps Google understand your images better. For example, if you have a recipe, product, or video page, you can describe the image using a specific format called ImageObject in JSON-LD.
Here’s a simple example:
Adding this information can improve how your images show up in search results and can increase visibility in Google Images.
Image Sitemap
You should also include images in your sitemap. This helps search engines find your images even if they aren’t linked directly on the page. Here’s a basic example of an image sitemap:
Google uses this information to show images in search results and connect them to the right pages. This is especially helpful if you use lazy loading or JavaScript to load images.
Make Sure Images Match Page Content
Image SEO isn’t just about formats and file sizes; it’s also about context. Every image on your page should relate to the surrounding content. For example, if you’re discussing “local SEO pages,” you might include a screenshot of your Google Business Profile and caption it: “Example of a Google Business Profile in Dallas.”
Search engines read the text around the images, so using relevant keywords and clear captions helps them understand what the image is about. This also improves the experience for users who might skim through the content. Avoid adding random images just to fill space; relevance is key.
Track Performance & SEO Metrics
You can’t improve what you don’t measure. After optimizing your images, keep an eye on how they affect page speed and traffic.
Tools to Use:
- PageSpeed Insights and Lighthouse: Check how quickly your images load and what might be slowing them down.
- WebPageTest: Provides a detailed breakdown of image loading behavior.
- Google Search Console → Performance: See how much traffic your images are getting from Google Image Search.
- lighthouse-ci: Automate performance checks to find large images before they go live.
Regularly checking these tools helps you stay informed. It will also show you which images need further compression or replacement.
Free Online Tools & Plugins
If you’re not ready to automate yet, several free tools can help with image SEO:
- ImageKit.io: Offers real-time image optimization and CDN delivery.
- Kraken.io: A simple tool for compressing images.
- TinyPNG: Great for bulk JPEG/PNG compression using a web interface.
Use these tools while building or updating your site, especially if you’re not yet using automated systems.
Final Thoughts
Image optimization is about more than just reducing file sizes; it’s about speed, clarity, and making sure people can find your images when they search. This isn’t a one-time task, so make sure to check your site every few months and analyze popular pages.
Here's a quick checklist:
- Resize images to fit their containers
- Compress images to 70-80% quality
- Use meaningful filenames and alt text
- Implement responsive techniques (<picture>, srcset)
- Deliver images through a CDN with format conversion
- Mark up images with structured data and sitemaps
- Monitor performance using Lighthouse and Google Search Console
Start with your most important pages, like your homepage or lead-generation content, and you’ll see improvements in load times, lower bounce rates, and better search rankings.