Skip to main content
doc0blade47/next.jsdocumentation home
Sign in

Images and Metadata

Last updated Oct 12, 2026100% grounded

Overview

Understanding Images and Metadata

Images and metadata play a crucial role in how your website looks, performs, and ranks in search engine results. Optimizing your images ensures that your pages load quickly for visitors, while properly configured metadata guarantees that search engines understand your content and social media platforms display beautiful previews when your links are shared.


Optimizing Image Loading

1. Choose Modern Image Formats

Always use efficient image formats to reduce file sizes without sacrificing visual quality. Supported image formats include:

  • PNG
  • JPEG
  • WebP
  • SVG
  • GIF

Tip

Whenever possible, use WebP for photographs and complex graphics, as it offers superior compression compared to traditional JPEG and PNG files.

2. Provide Appropriate Dimensions

Always specify the width and height attributes on your images. This prevents layout shifts while the page is loading, creating a smoother visual experience for your visitors.

3. Enable Lazy Loading

Lazy loading defers the loading of images that are off-screen until the user scrolls down to them. This significantly improves initial page load times, especially on mobile devices.


Configuring SEO Tags and Social Share Previews

Essential Metadata Fields

Metadata helps search engines and social media networks understand what your web pages are about. You can configure these settings directly within your page properties or site settings.

Field NameDescriptionRecommended Length
Page TitleThe main title displayed in search engine results.50–60 characters
Meta DescriptionA brief summary of the page content for search results.150–160 characters
Share ImageThe thumbnail image displayed when your link is shared on social media.1200x630 pixels
Share TitleA catchy title specifically optimized for social media posts.Under 70 characters
Share DescriptionEngaging text that accompanies your social media preview.Under 200 characters

Best Practices for Social Sharing

Warning

If you do not explicitly set a social share image, platforms will automatically pick the first image they find on the page, which may be an irrelevant icon, a banner, or a poorly cropped photo. Always assign a dedicated share image to control your brand's presentation.

  1. Use High-Resolution Preview Images: Ensure your social share images look crisp on high-density Retina displays. Stick to a 1.91:1 aspect ratio (such as 1200x630 pixels) to avoid awkward cropping on platforms like Facebook, LinkedIn, and Twitter.
  2. Keep Titles Concise: Social media feeds move fast. Make sure your share titles get straight to the point so users immediately understand why they should click.
Was this page helpful?