Skip to content

Commit

Permalink
Fix: Ignore unsupported quality parameter for PPM files
Browse files Browse the repository at this point in the history
  • Loading branch information
Daiki Ichiyama authored and rbuchberger committed Jul 20, 2024
1 parent f393067 commit 3e9bfcb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/jekyll_picture_tag/images/image_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ def write_opts

opts[:strip] = PictureTag.preset['strip_metadata']

# gifs don't accept a quality setting, and PNGs don't on older versions of
# gifs don't accept a quality setting, and PNGs and PPMs don't on older versions of
# vips. Since it's not remarkably useful anyway, we'll ignore them.
opts[quality_key] = base.quality unless %w[gif png].include? base.format
opts[quality_key] = base.quality unless %w[gif png ppm].include? base.format

opts.transform_keys(&:to_sym)
end
Expand Down

0 comments on commit 3e9bfcb

Please sign in to comment.