mirror of
https://github.com/strapi/strapi.git
synced 2025-09-09 08:39:45 +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)) {
|
if (await isFaultyImage(currentFile)) {
|
||||||
throw new ApplicationError('File is not a valid image');
|
throw new ApplicationError('File is not a valid image');
|
||||||
}
|
}
|
||||||
if (!(await isOptimizableImage(currentFile))) {
|
if (await isOptimizableImage(currentFile)) {
|
||||||
return currentFile;
|
return optimize(currentFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return optimize(currentFile);
|
return currentFile;
|
||||||
},
|
},
|
||||||
|
|
||||||
// TODO V5: remove enhanceFile
|
// TODO V5: remove enhanceFile
|
||||||
|
Loading…
x
Reference in New Issue
Block a user