vite-imagetools
Advanced tools
Comparing version 7.0.0 to 7.0.1
@@ -121,2 +121,7 @@ import path, { basename, extname } from 'node:path'; | ||
metadata = (await sharp(`${cacheOptions.dir}/${id}`).metadata()); | ||
// we set the format on the metadata during transformation using the format directive | ||
// when restoring from the cache, we use sharp to read it from the image and that results in a different value for avif images | ||
// see https://github.com/lovell/sharp/issues/2504 and https://github.com/lovell/sharp/issues/3746 | ||
if (config.format === 'avif' && metadata.format === 'heif' && metadata.compression === 'av1') | ||
metadata.format = 'avif'; | ||
} | ||
@@ -123,0 +128,0 @@ else { |
{ | ||
"name": "vite-imagetools", | ||
"description": "Load and transform images using a toolbox of import directives!", | ||
"version": "7.0.0", | ||
"version": "7.0.1", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "types": "dist/index.d.ts", |
Sorry, the diff of this file is not supported yet
44987
317