janczizikow / sleek

:chart_with_upwards_trend: Sleek is a modern Jekyll theme focused on speed performance & SEO best practices
https://janczizikow.github.io/sleek/
MIT License
423 stars 638 forks source link

Fixed gulp-responsive image enlargement error for small images #35

Closed stevenstetzler closed 6 years ago

stevenstetzler commented 6 years ago

Currently, gulp-responsive will fail on running gulp img when images smaller than 1999px are placed in the folder _img/posts, throwing the following error

events.js:167
      throw er; // Unhandled 'error' event
      ^
vips warning: Error: File `<file_name>`: Image enlargement is detected
  real width: 1237px, required width: 1999px
VipsJpeg: error reading resolution
vips warning: VipsJpeg: error reading resolution

(sharp:4339): GLib-CRITICAL **: g_hash_table_lookup: assertion 'hash_table != NULL' failed

(sharp:4339): GLib-CRITICAL **: g_hash_table_lookup: assertion 'hash_table != NULL' failed

(sharp:4339): GLib-CRITICAL **: g_hash_table_insert_internal: assertion 'hash_table != NULL' failed

(sharp:4339): GLib-CRITICAL **: g_hash_table_lookup: assertion 'hash_table != NULL' failed
Segmentation fault (core dumped)

Error fixed with the suggestion from this thread, adding the errorOnEnlargement: false option to the img gulp task.