Fix Image Dimensions for Layout Stability

How to optimize pearsoncars.com

Ruby on Rails SiteScore: 19/100Analyzed February 2026

Fix Image Dimensions for Layout Stability

Medium Impact+8 points estimated

Why It Matters

Unsized images cause 0.211 CLS score as content jumps during load, especially the video thumbnail causing major shifts.

How to Fix

Add explicit width and height attributes to all image tags in your Rails views. Set CSS aspect-ratio properties for responsive images. Reserve space for the video thumbnail container with min-height to prevent layout shifts during loading.

0Poor

What This Score Means

A score of 19 falls in the "Poor" range (50-89). While it is better than poor (0-49), you should aim for 90+ to provide an optimal user experience and maximize SEO benefits.

This site is slower than approximately 35% of similar sites. The main issues affecting performance are image optimization, JavaScript execution time, and layout stability.

Addressing these issues could improve your conversion rate by 15-20% and boost your search engine rankings.

Core Web Vitals Analysis

LCP

Largest Contentful Paint

39.7s
Poor

Good: < 2.5s

Measures how long it takes for the main content to appear on screen

INP

Interaction to Next Paint

349ms
Needs Improvement

Good: < 200ms

Measures how quickly the page responds to user interactions

CLS

Cumulative Layout Shift

0.21
Needs Improvement

Good: < 0.1

Measures visual stability - how much content shifts during page load

AI Performance Analysis

This Ruby on Rails site has severe performance issues with a critically low score of 19/100. The biggest problem is render-blocking CSS files that are preventing the page from displaying content for nearly 20 seconds, with First Contentful Paint taking 19.3 seconds and Largest Contentful Paint reaching an extreme 39.7 seconds. The site is loading over 2MB of unused JavaScript (especially from YouTube and reCAPTCHA), has no caching configured for images and assets, and suffers from significant layout shifts caused by unsized images. Immediate fixes should focus on deferring non-critical CSS, removing unused JavaScript, implementing proper caching headers, and adding explicit dimensions to images - these changes could potentially improve the performance score by 50+ points and make the site actually usable for visitors.

Other Optimization Recommendations

Remove Unused JavaScript Resources

High Impact+35 points estimated

Why It Matters:

Unused JavaScript totaling 2,179 KiB is delaying LCP by 10.7 seconds and blocking page interactivity.

How to Fix:

In your Rails application, remove or defer YouTube embed scripts and reCAPTCHA until user interaction. Use dynamic imports for third-party scripts. Configure your asset pipeline to exclude unused JavaScript libraries from the main bundle.

Implement Proper Image Caching Headers

High Impact+25 points estimated

Why It Matters:

Images totaling 7,425 KiB lack cache headers, causing repeat downloads and delaying LCP by 6.7 seconds.

How to Fix:

Configure your Rails application to set long-term cache headers for static assets. Add 'expires 1y' and 'Cache-Control: public, immutable' to your nginx/Apache config for image files. Use Rails asset pipeline fingerprinting to enable aggressive caching.

Want to Analyze YOUR Website?

Get AI-powered performance insights with actionable fixes in 30 seconds

More Ruby on Rails Speed Tests

Ruby on Rails Performance Resources

Frequently Asked Questions

Keep Your Site Fast After Optimization

Once your site is optimized, maintain that speed. Use DeployHQ for zero-downtime, automated deployments—so performance fixes and updates go live safely every time, without breaking your site.

Explore DeployHQ →Trusted by engineering teams shipping high-performance sites