← back to Stayclaim

next.config.mjs

36 lines

/** @type {import('next').NextConfig} */
const nextConfig = {
  images: {
    // Sources we hot-link from for the PD film-images grid + general listing imagery.
    // Stock-photo hosts (Unsplash/Pexels/etc.) are intentionally NOT listed —
    // per Steve's "zero stock images" rule for the WhoLivedThere ecosystem.
    remotePatterns: [
      // Public-domain image sources (pd_film_image)
      { protocol: 'https', hostname: 'upload.wikimedia.org' },
      { protocol: 'https', hostname: 'commons.wikimedia.org' },
      { protocol: 'https', hostname: 'archive.org' },
      { protocol: 'https', hostname: '*.archive.org' },
      { protocol: 'https', hostname: 'tile.loc.gov' },
      { protocol: 'https', hostname: 'www.loc.gov' },
      { protocol: 'https', hostname: 'cdn.loc.gov' },
      { protocol: 'https', hostname: 'lantern.mediahist.org' },
      { protocol: 'https', hostname: 'ids.si.edu' },
      { protocol: 'https', hostname: 'images.metmuseum.org' },
      { protocol: 'https', hostname: 'collectionapi.metmuseum.org' },
      { protocol: 'https', hostname: 'live.staticflickr.com' },
      { protocol: 'https', hostname: '*.flickr.com' },
      { protocol: 'https', hostname: 'api.openverse.org' },
      { protocol: 'https', hostname: '*.openverse.engineering' },
      { protocol: 'https', hostname: 'images.nypl.org' },
      { protocol: 'https', hostname: 'digitalcollections.nypl.org' },
      // Listing/legacy sources
      { protocol: 'https', hostname: '*.muscache.com' },
      { protocol: 'https', hostname: '*.airbnb.com' },
    ],
    // Lower default deviceSizes since we're rendering many small grid cells
    imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
    deviceSizes: [320, 480, 640, 750, 828, 1080, 1200, 1440],
  },
};
export default nextConfig;