From 5198dd54b7684dac2bd3379d9a5779c018aae323 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Wed, 22 Mar 2023 03:43:19 +0000 Subject: [PATCH] WebP images support in PDF output (#38368). Patch by Jun NAITOH. git-svn-id: https://svn.redmine.org/redmine/trunk@22141 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- Gemfile | 2 +- lib/redmine/export/pdf.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 292cf0c1a..74b25a873 100644 --- a/Gemfile +++ b/Gemfile @@ -12,7 +12,7 @@ gem 'marcel' gem 'mail', '~> 2.8.1' gem 'nokogiri', '~> 1.14.0' gem 'i18n', '~> 1.12.0' -gem 'rbpdf', '~> 1.21.0' +gem 'rbpdf', '~> 1.21.1' gem 'addressable' gem 'rubyzip', '~> 2.3.0' diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb index 2ead7f7ca..e7133210d 100644 --- a/lib/redmine/export/pdf.rb +++ b/lib/redmine/export/pdf.rb @@ -149,7 +149,7 @@ module Redmine def self.attach(attachments, filename, encoding) filename_utf8 = Redmine::CodesetUtil.to_utf8(filename, encoding) atta = nil - if /^[^\/"]+\.(gif|jpg|jpe|jpeg|png)$/i.match?(filename_utf8) + if /^[^\/"]+\.(gif|jpg|jpe|jpeg|png|webp)$/i.match?(filename_utf8) atta = Attachment.latest_attach(attachments, filename_utf8) end if atta && atta.readable? && atta.visible? -- 2.39.5