Prompt

How do I make responsive images for mobile, tablet, and desktop?

Technology / CDN & Edge Infrastructure1 observationLast seen Nov 3, 2026

Latest observation

Nov 3, 2026OpenAI APIWeb search: off

To make responsive images for mobile, tablet, and desktop, you usually want the browser to load the most appropriate image size for the user’s screen.

1) Use srcset and sizes for different screen widths

This is the most common and recommended approach.

<img
  src="image-800.jpg"
  srcset="
    image-400.jpg 400w,
    image-800.jpg 800w,
    image-1200.jpg 1200w
  "
  sizes="
    (max-width: 600px) 100vw,
    (max-width: 1024px) 50vw,
    800px
  "
  alt="Example image"
/>

How it works

  • srcset gives the browser multiple image file options.
  • sizes tells the browser how wide the image will be displayed at different viewport widths.
  • The browser picks the best file automatically.

2) Use the <picture> element for art direction

If you want to show completely different crops or compositions on mobile vs desktop, use <picture>.

<picture>
  <source media="(max-width: 600px)" srcset="mobile.jpg">
  <source media="(max-width: 1024px)" srcset="tablet.jpg">
  <img src="desktop.jpg" alt="Example image">
</picture>

Use this when:

  • Mobile needs a different crop
  • Desktop needs a wider version
  • You want different images, not just different sizes

3) Make images scale with CSS

For fluid layouts, make sure images don’t overflow their containers:

img {
  max-width: 100%;
  height: auto;
}

This keeps the image responsive inside its parent container.

4) Consider modern formats

Use newer formats for better compression:

  • WebP
  • AVIF

You can provide fallback formats too:

<picture>
  <source srcset="image.avif" type="image/avif">
  <source srcset="image.webp" type="image/webp">
  <img src="image.jpg" alt="Example image">
</picture>

5) Good practice

  • Export multiple sizes from your design tool
  • Use appropriately compressed images
  • Match image dimensions to real display needs
  • Add width and height attributes to reduce layout shift
<img src="image-800.jpg" width="800" height="600" alt="Example">

Quick recommendation

  • Use srcset + sizes for most responsive images
  • Use picture when the image itself should change between breakpoints
  • Always use CSS to make images scale

If you want, I can give you:

  1. a plain HTML/CSS example,
  2. a React/Next.js example, or
  3. a complete responsive image setup for mobile/tablet/desktop.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.