mirror of
				https://github.com/strapi/strapi.git
				synced 2025-10-31 01:47:13 +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; | ||||
| }; | ||||
| 
 | ||||
| // 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 => { | ||||
|   let format; | ||||
|   try { | ||||
| @ -185,6 +194,7 @@ const isImage = async file => { | ||||
| }; | ||||
| 
 | ||||
| module.exports = () => ({ | ||||
|   isSupportedImage, | ||||
|   isOptimizableImage, | ||||
|   isImage, | ||||
|   getDimensions, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Pierre Noël
						Pierre Noël