Skip to content

Placeholder support #189

@pi0

Description

@pi0

Basic placeholder property is currently supported for <NuxtImg> (via #477).

Usage: This will auto-generate a URL from same source and 10x10 dimensions:

<nuxt-img src=".." placeholder>

It is also possible to give a custom placeholder (data)URL as a string or an array [width, height, quality] to customize URL generation behavior.

The original image will be loaded during hydration and after mounted.

Future enhancements:

  • Fetch and inline placeholder as data: url
  • Support smoother blurry versions when possible (depends on provider)
  • Start loading images in parallel to hydration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions