davestewart / nuxt-content-assets

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

Update content on image update #31

Closed davestewart closed 1 year ago

davestewart commented 1 year ago

This PR solves the issue of image resizing not updating values in cached content.

Currently, if an image is resized, it will trigger a live-reload, but the proportions could be wrong.

Now, when images are first processed, any content they are included in is registered, and when the image is updated in future, the related content is scanned and image sizes manually changed.

This PR also lays the groundwork for #18 where pre-cached content could be tested for relative paths and written back to if any are found.

Note that the work here is waiting for the following PR to be merged and released in Nuxt Content core: