System Information
-
Strapi Version: 4.1.3
-
Operating System: Windows 10
-
Database:
-
Node Version: 16.13.0
-
NPM Version: 8.3.0
-
Yarn Version:
Hi, in version 3 of Strapi, I was able to override default upload plugin (I need to add functionality that automatically converts images when uploading to webp format) by adding Upload.js and image-manipulation.js files in folder extensions/upload/services , but that method doesn’t work in version 4. So my question is, how do I do the same thing in version 4 of Strapi?
Maybe this gives you an idea of how it could be done: Strapi Blurhash · GitHub
1 Like
Thank you! I did manage to register upload.js function to strapi and it seems to work, but now I’m left with image-manipulation.js file, which I don’t know how to register. I can’t upload any pictures because program crashes when trying to find functions that are defined in image-manipulation.js code. Do you have any idea how do I register that file to strapi?
const {
getDimensions,
generateBase64,
generateThumbnail,
generateWebpFormat,
generateResponsiveFormats,
} = strapi.plugin('upload').service('image-manipulation');
This is the code where I try to access image-manipulation functions.