Recude quality in image variant creation
Currently, we create variant image sizes with the script available in the
scripts/ directory. This works pretty fine.
I suggest to reduce the quality level, in order to further reduce the size of images that need to be loaded. I can't see a real difference, but the image size was more than halved for some examples. Something along this way:
diff --git a/scripts/create_jumbotron_variants.sh b/scripts/create_jumbotron_variants.sh index b24b7d6..3df4855 100755 --- a/scripts/create_jumbotron_variants.sh +++ b/scripts/create_jumbotron_variants.sh @@ -84,12 +84,12 @@ do else # Create new version for this breakpoint echo "Generating $target_file ($target_width px)" - convert "$source_file" -resize "$target_width" "$target_file" + convert "$source_file" -resize "$target_width" -quality 50 "$target_file" fi else - # Instead of upscaling, create a relative link to the original - echo "Creating link $target_file (Source smaller then target)" - ln -sr "$source_file" "$target_file" + # Instead of upscaling, only reduce quality + echo "Reducing quality of $target_file" + convert "$source_file" -quality 50 "$target_file" fi done done