emil-petras / strapi-blurhash

A plugin for Strapi CMS that generates blurhash for your uploaded images
https://www.npmjs.com/package/strapi-blurhash
20 stars 16 forks source link

add optional regeneration of blurhash when images are updated #4

Closed trijpstra-fourlights closed 1 year ago

trijpstra-fourlights commented 1 year ago

Implements #1

Solution provided by @tefkah

Example usage:

in config/plugins.js

module.exports = {
    ...
    'strapi-blurhash': {
      enabled: true,
      config: {
        regenerateOnUpdate: true
      }
    },
  }
emil-petras commented 1 year ago

Hey, I've tested this. It does not work. I haven't had the time to investigate why. It may be due to regenerateOnUpdate not being loaded (always being false).

trijpstra-fourlights commented 1 year ago

Hi, I'm sorry for the inconvenience. I was not testing for the value of the boolean. Also, plugin configuration is nested in config. So I've updated the OP with the correct usage.