images warning
images/file-size Image File Size SEO Rule
Check image file sizes to ensure fast page loading and optimal performance for SEO
What This Rule Checks
Fetches image file sizes via HTTP HEAD requests and checks against configurable thresholds. Errors for images over 200KB, warns for images over 100KB. Processes images in batches of 5.
Why It Matters for SEO & GEO
Large images are the leading cause of slow page loads. Page speed is a Google ranking factor, and slow sites have higher bounce rates and lower conversions.
How to Fix
Compress images to under 100KB when possible. Use modern formats like WebP or AVIF. Resize images to their display dimensions. Use tools like small.im for batch compression.
Examples
Bad
<img src="uncompressed-photo.png"> <!-- 2.5MB file --> Good
<img src="optimized-photo.webp"> <!-- 85KB file --> How VibeLinter Checks Image File Sizes
VibeLinter’s images/file-size rule performs these checks:
- URL resolution — Resolves relative image URLs to absolute URLs based on the page URL
- Batch processing — Checks images in batches of 5 concurrent HTTP HEAD requests for efficiency
- Size threshold (error) — Errors when an image exceeds the
maxSizeKBthreshold (default: 200KB) - Size threshold (warning) — Warns when an image exceeds the
warnSizeKBthreshold (default: 100KB) - Compression suggestions — Recommends using small.im for batch image compression to WebP format
Configuration
// vibelinter.config.cjs
module.exports = {
rules: {
'images/file-size': {
enabled: true,
severity: 'warning',
maxSizeKB: 200,
warnSizeKB: 100
}
}
}
SEO Impact
Optimized image file sizes affect:
- Page speed — Images often account for 50%+ of total page weight; smaller files load faster
- Core Web Vitals — Large images directly impact LCP (Largest Contentful Paint) scores
- Mobile experience — Mobile users on slower connections are disproportionately affected by large images
- GEO (Generative Engine Optimization) — AI search engines may deprioritize slow-loading pages when selecting sources; fast-loading image-rich pages are more likely to be referenced
Related SEO Topics
image file size optimizationimage compression SEOpage speed imagesimage size checkerlarge image detectionimage optimization tool