Open djmtype opened 4 years ago
BTW, I've tried variations of these settings:
withoutEnlargement: true,
skipOnEnlargement: true,
Same here.
withoutEnlargement: false,
works for me.
I'm seeing similar error when any size is provided and a matching image is smaller...
.pipe(
responsive({
'**/*.png': [
{ width: 480, rename: { suffix: '-480px', extname: '.jpg' }, withoutEnlargement: true },
{ width: 640, rename: { suffix: '-640px', extname: '.jpg' }, withoutEnlargement: true },
{ width: 997, rename: { suffix: '-997px', extname: '.jpg' }, withoutEnlargement: true }, // Succeeds on 997px image.
{ width: 998, rename: { suffix: '-998px', extname: '.jpg' }, withoutEnlargement: true }, // Fails on 997px image.
]
},
{
// Global configuration for all images
// The output quality for JPEG, WebP and TIFF output formats
quality: 70,
// Use progressive (interlace) scan for JPEG and PNG output
progressive: true,
// Zlib compression level of PNG output format
compressionLevel: 6,
// Strip all metadata
withMetadata: false
})
)
And the console output when it fails...
[23:41:55] 'imgBuild' errored after 594 ms
[23:41:55] Error in plugin "gulp-responsive"
Error at DestroyableTransform.through2Handler [as _transform] (/node_modules/gulp-responsive/lib/index.js:98:14)
(sharp:3898): GLib-CRITICAL **: 23:41:55.402: g_hash_table_lookup: assertion 'hash_table != NULL' failed
(sharp:3898): GLib-CRITICAL **: 23:41:55.402: g_hash_table_lookup: assertion 'hash_table != NULL' failed
(sharp:3898): GLib-CRITICAL **: 23:41:55.403: g_hash_table_lookup: assertion 'hash_table != NULL' failed
(sharp:3898): GLib-CRITICAL **: 23:41:55.403: g_hash_table_insert_internal: assertion 'hash_table != NULL' failed
(sharp:3898): GLib-CRITICAL **: 23:41:55.403: g_hash_table_lookup: assertion 'hash_table != NULL' failed
Segmentation fault (core dumped)
npm ERR! code ELIFECYCLE
npm ERR! errno 139
npm ERR! mySite@0.1.0 gulp: `gulp "imgBuild"`
npm ERR! Exit status 139
npm ERR!
npm ERR! Failed at the mySite@0.1.0 gulp script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2021-08-06T23_41_55_603Z-debug.log
If one of my images happens to be smaller than the smallest size (576px) setting, I get an error and the
gulp images
task stops performing.My gulpfile: