mirror of
https://github.com/strapi/strapi.git
synced 2025-07-26 02:20:32 +00:00
add deprecation message
This commit is contained in:
parent
0fbcd89ec8
commit
0039c33952
@ -160,6 +160,15 @@ const breakpointSmallerThan = (breakpoint, { width, height }) => {
|
|||||||
return breakpoint < width || breakpoint < height;
|
return breakpoint < width || breakpoint < height;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// TODO V5: remove isSupportedImage
|
||||||
|
const isSupportedImage = (...args) => {
|
||||||
|
process.emitWarning(
|
||||||
|
'[deprecated] In future versions, `isSupportedImage` will be removed. Replace it with `isImage` or `isOptimizableImage` instead.'
|
||||||
|
);
|
||||||
|
|
||||||
|
return isOptimizableImage(...args);
|
||||||
|
};
|
||||||
|
|
||||||
const isOptimizableImage = async file => {
|
const isOptimizableImage = async file => {
|
||||||
let format;
|
let format;
|
||||||
try {
|
try {
|
||||||
@ -185,6 +194,7 @@ const isImage = async file => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
module.exports = () => ({
|
module.exports = () => ({
|
||||||
|
isSupportedImage,
|
||||||
isOptimizableImage,
|
isOptimizableImage,
|
||||||
isImage,
|
isImage,
|
||||||
getDimensions,
|
getDimensions,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user