davestewart / nuxt-content-assets

Enable locally-located assets in Nuxt Content
https://npmjs.com/package/nuxt-content-assets
115 stars 8 forks source link

Move image size hint processing to plugin #25

Closed davestewart closed 1 year ago

davestewart commented 1 year ago

Background

Right now, image size hints such as ratio and query are generated in the module build.

These are then stored (redundantly) in the asset index in addition to width and height.

Both ratio and query could be built from width and height in the plugin.

Proposal

Pass image flag options to the plugin, and move the setting of size hints there.