Prompt

I'm building a website and need automatic image resizing for different breakpoints

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

Latest observation

Nov 2, 2026OpenAI APIWeb search: off

A good way to handle this is to generate responsive image variants and serve the right one at each breakpoint using srcset and sizes.

Basic approach

  1. Upload one large original image
  2. Generate resized versions for common widths, for example:
    • 320px
    • 640px
    • 960px
    • 1280px
    • 1920px
  3. Use responsive HTML so the browser picks the best file automatically.

Example

<img
  src="image-640.jpg"
  srcset="
    image-320.jpg 320w,
    image-640.jpg 640w,
    image-960.jpg 960w,
    image-1280.jpg 1280w
  "
  sizes="(max-width: 600px) 100vw,
         (max-width: 1200px) 50vw,
         33vw"
  alt="Example image">

How it works

  • srcset tells the browser which image widths are available.
  • sizes tells the browser how large the image will appear at different screen widths.
  • The browser chooses the most appropriate file based on device width and pixel density.

If you want automatic resizing on the server/CDN

Use an image service or CDN that can resize on demand:

  • Cloudinary
  • Imgix
  • ImageKit
  • Fastly Image Optimizer
  • Cloudflare Images

These can generate URLs like:

https://example.com/image.jpg?width=640

Best practices

  • Keep images in modern formats like WebP or AVIF
  • Serve appropriately compressed files
  • Use loading="lazy" for below-the-fold images
  • Preserve aspect ratio to avoid layout shifts

Example with <picture> for format fallbacks

<picture>
  <source
    type="image/avif"
    srcset="image-320.avif 320w, image-640.avif 640w, image-960.avif 960w"
    sizes="(max-width: 600px) 100vw, 50vw">
  <source
    type="image/webp"
    srcset="image-320.webp 320w, image-640.webp 640w, image-960.webp 960w"
    sizes="(max-width: 600px) 100vw, 50vw">
  <img
    src="image-640.jpg"
    srcset="image-320.jpg 320w, image-640.jpg 640w, image-960.jpg 960w"
    sizes="(max-width: 600px) 100vw, 50vw"
    alt="Example image">
</picture>

If you tell me what stack you’re using, I can show the exact setup:

  • plain HTML/CSS
  • React / Next.js
  • Vue / Nuxt
  • WordPress
  • server-side image processing with Node/Python/PHP

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.