{
  "id": "skeleton-image",
  "name": "Skeleton Image",
  "category": "loaders",
  "tags": [
    "placeholder",
    "photo",
    "aspect-ratio",
    "lazy loading",
    "shimmer"
  ],
  "description": "An image placeholder that keeps its aspect ratio and shows a photo icon under a diagonal shimmer.",
  "url": "https://copy-css.com/snippets/skeleton-image",
  "markdown": "https://copy-css.com/snippets/skeleton-image.md",
  "html": "<div class=\"skel-image\" role=\"status\" aria-label=\"Loading image\"></div>",
  "css": ".skel-image {\n  position: relative;\n  width: min(100%, 280px);\n  aspect-ratio: 4 / 3;\n  overflow: hidden;\n  border-radius: 14px;\n  background: #e5e7eb;\n}\n\n/* Photo icon */\n.skel-image::before {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  width: 48px;\n  height: 48px;\n  margin: auto;\n  background: #cbd5e1;\n  -webkit-mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.1-3.1a2 2 0 0 0-2.8 0L6 21'/%3E%3C/svg%3E\") center / contain no-repeat;\n  mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.1-3.1a2 2 0 0 0-2.8 0L6 21'/%3E%3C/svg%3E\") center / contain no-repeat;\n}\n\n.skel-image::after {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  background: linear-gradient(120deg, #fff0 30%, #ffffff99 50%, #fff0 70%) 0 0 / 250% 100%;\n  animation: skel-image-shine 1.8s ease-in-out infinite;\n}\n\n@keyframes skel-image-shine {\n  from { background-position: 100% 0; }\n  to { background-position: 0 0; }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .skel-image::after { animation: none; }\n}",
  "features": [
    "keyframe animations",
    "linear gradients",
    "masks",
    "aspect-ratio",
    "reduced-motion support"
  ],
  "customProperties": []
}
