Technical SEO

Choose image dimensions and formats deliberately

Prepare images for their actual display size and inspect the encoded result. Format, quality, transparency and source dimensions affect the trade-off; converting a file does not guarantee a smaller output. Keep the original available so a lossy conversion is reversible at the asset level.

Illustration of technical tools, gears and chart bars

A worked example

A fictional article uses a small transparent diagram and a large photograph. PNG may preserve the diagram cleanly, while a WebP copy of the photograph can be compared at several quality settings. Re-encoding a compressed source as PNG may increase its size, so the editor compares actual bytes and visual detail rather than relying on a format slogan.

A practical checklist

  1. Record the source dimensions and the intended rendered width. Resize a copy when a very large source adds no useful detail to the page.
  2. Choose a supported output format and quality setting. Preserve transparency when needed, and inspect edges, labels and gradients in the exported file.
  3. Check output dimensions, file size and contextual alt treatment. Use responsive image markup where appropriate, and reserve layout space to reduce unexpected movement.

1. Modern format selection: WebP vs AVIF vs SVG

Delivering modern image formats is essential for fast Largest Contentful Paint (LCP) and smooth user experiences. AVIF provides up to 30% smaller file sizes than WebP at comparable visual fidelity, making it ideal for editorial photographs and hero graphics. Vector SVG should be utilized for logos, technical icons, and simple diagrams to guarantee crisp display at zero visual degradation.

2. Image format comparison and optimization matrix

Evaluate which image format best matches your asset type:

2. Image format comparison and optimization matrix comparison
Image CategoryRecommended FormatTypical Compression RatioKey Implementation Practice
Hero / Article PhotosAVIF with WebP fallback60%–80% smaller than legacy JPEGPreload above-the-fold hero image with priority attribute
Technical Diagrams & UIWebP or optimized PNGLossless edge preservationUse PNG if transparent sharp text edges blur in lossy codecs
Icons & Brand LogosVector SVGInfinite scalability under 10KBInline SVG or serve via static public CDN directory
Interactive ChartsResponsive SVG or HTML TableAccessible to screen readers and botsProvide data table equivalent for crawlers

3. Next.js image component implementation

Always define explicit width and height aspect ratios to eliminate Cumulative Layout Shift (CLS):

// components/article-hero-image.tsx
import Image from "next/image";

export function ArticleHeroImage({ src, alt }: { src: string; alt: string }) {
  return (
    <div className="relative aspect-video w-full overflow-hidden rounded-xl">
      <Image
        src={src}
        alt={alt}
        fill
        priority
        sizes="(max-width: 768px) 100vw, (max-width: 1200px) 75vw, 800px"
        className="object-cover"
      />
    </div>
  );
}

4. Pre-launch image optimization checklist

Verify these technical controls on all editorial media assets:

  • Ensure no image file exceeds 200KB in production bundles.
  • Provide explicit width and height or aspect-ratio CSS to reserve layout space and prevent CLS.
  • Add priority hints only to the single above-the-fold LCP image per page.
  • Verify that meaningful, contextual alt text is applied to every non-decorative image.

What to avoid

Avoid promising a universal compression percentage or assuming higher quality creates a smaller file. Browser conversion can remove metadata and change color; review the export before replacing a production asset. Animated input may become a still image in a canvas-based workflow.

Related guides and tools

Frequently asked questions

Practical answers to common technical and editorial questions.

Is converting JPG to PNG a compression strategy?

Not necessarily. PNG output can be larger; compare the actual result and choose the format for the content's needs.

Why does Next.js next/image require explicit sizes attributes?

The sizes attribute informs the browser which responsive image source to download from the srcset before CSS layout calculations finish, speeding up LCP significantly.

Should all blog images use lazy loading?

Lazy loading is recommended for all below-the-fold images. However, the above-the-fold hero graphic should have lazy loading disabled (or priority set to true) to avoid delaying LCP.

Documentation & Standards

Sources and further reading

Apply this guidance to your publication research

Ready to plan your publication campaign?

Compare publications across DA, DR, traffic estimates and listed placement prices, or explore our free technical SEO tools.