Skip to content

Webp support and blurred-in loading for image_tag #81

@justinallenmarsh

Description

@justinallenmarsh

Shimmer currently uses minimagick and jpg for overwriting the images. The images are loaded via baseline (top to bottom) which is very ugly. We should be using webp, vips instead! This will increase the lighthouse score for images generated with image_tag.

In order to make it more beautiful, the proposal is also to incorporate a blur-in transition. Where at 10x10px image hash is saved to the database and rendered inline and blurred. When the image loads it will overwrite this.

Acceptance Criteria

  • Switch out vips for minimagick
  • Verify vips works on heroku/production
  • image_tag should create and save a base64 encoded 10x10px image as a background-url.
  • loading class should be applied which shows this url while the image is loading
  • active_storage blob table should have a preview_hash column
  • preview_hash should be generated in a background job.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions