mirror of
https://github.com/strapi/strapi.git
synced 2025-09-08 16:16:21 +00:00
fix optimization file
This commit is contained in:
parent
aa588b4629
commit
03c8ba6bba
@ -130,11 +130,11 @@ module.exports = ({ strapi }) => ({
|
||||
if (await isFaultyImage(currentFile)) {
|
||||
throw new ApplicationError('File is not a valid image');
|
||||
}
|
||||
if (!(await isOptimizableImage(currentFile))) {
|
||||
return currentFile;
|
||||
if (await isOptimizableImage(currentFile)) {
|
||||
return optimize(currentFile);
|
||||
}
|
||||
}
|
||||
return optimize(currentFile);
|
||||
return currentFile;
|
||||
},
|
||||
|
||||
// TODO V5: remove enhanceFile
|
||||
|
Loading…
x
Reference in New Issue
Block a user