1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-31 19:47:14 +00:00

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
This commit is contained in:
Go MAEDA 2023-03-22 03:43:19 +00:00
parent fe386d1497
commit 5198dd54b7
2 changed files with 2 additions and 2 deletions

View File

@ -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'

View File

@ -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?