content-type image/vnd.microsoft.icon is not supported for .ico image
parulkanani opened this issue · 1 comments
Gemfile:
gem "paperclip", git: "git://github.com/thoughtbot/paperclip.git"
Model.rb
has_attached_file :favicon_image,
:styles => {
:original => {
:geometry => "120x120>"
},
:large => {
:geometry => "102x76#"
},
:medium => {
:geometry => "70x70#"
},
:thumb => {
:geometry => "50x100#"
}
}
validates_attachment_content_type :favicon_image, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/vnd.microsoft.icon", "image/x-icon"]
image: favicon.ico
content-type: image/vnd.microsoft.icon
When I add favicon.ico then it is giving below error
Error:
[paperclip] Trying to link /tmp/RackMultipart20190620-2730-1kpihe5.ico to /tmp/6e8bcdadab6dacded4883660e782363a20190620-2730-1rg0rkq.ico
[paperclip] Trying to link /tmp/6e8bcdadab6dacded4883660e782363a20190620-2730-1rg0rkq.ico to /tmp/6e8bcdadab6dacded4883660e782363a20190620-2730-y1opyw.ico
Command :: file -b --mime '/tmp/6e8bcdadab6dacded4883660e782363a20190620-2730-y1opyw.ico'
Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/6e8bcdadab6dacded4883660e782363a20190620-2730-1rg0rkq.ico[0]' 2>/dev/null
Command :: identify -format %m '/tmp/6e8bcdadab6dacded4883660e782363a20190620-2730-1rg0rkq.ico[0]'
Command :: convert '/tmp/6e8bcdadab6dacded4883660e782363a20190620-2730-1rg0rkq.ico[0]' -auto-orient -resize "48x48>" '/tmp/1bf7b47ddc009e5e514271f17e6e75d420190620-2730-x8dkja'
[paperclip] Trying to link /tmp/1bf7b47ddc009e5e514271f17e6e75d420190620-2730-x8dkja to /tmp/a7da76a9ab697692e58e2e8811e8a62a20190620-2730-654dhl
Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/a7da76a9ab697692e58e2e8811e8a62a20190620-2730-654dhl[0]' 2>/dev/null
[paperclip] An error was received while processing: #<Paperclip::Errors::NotIdentifiedByImageMagickError: Paperclip::Errors::NotIdentifiedByImageMagickError>
Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/a7da76a9ab697692e58e2e8811e8a62a20190620-2730-654dhl[0]' 2>/dev/null
[paperclip] An error was received while processing: #<Paperclip::Errors::NotIdentifiedByImageMagickError: Paperclip::Errors::NotIdentifiedByImageMagickError>
Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/a7da76a9ab697692e58e2e8811e8a62a20190620-2730-654dhl[0]' 2>/dev/null
[paperclip] An error was received while processing: #<Paperclip::Errors::NotIdentifiedByImageMagickError: Paperclip::Errors::NotIdentifiedByImageMagickError>
[paperclip] Trying to link /tmp/a7da76a9ab697692e58e2e8811e8a62a20190620-2730-654dhl to /tmp/6e8bcdadab6dacded4883660e782363a20190620-2730-qbru1e.ico
Command :: file -b --mime '/tmp/6e8bcdadab6dacded4883660e782363a20190620-2730-qbru1e.ico'
(43.6ms) ROLLBACK
Issue is in style. I just updated the style and my problem is resolved
like,
has_attached_file :favicon_image,
:style => { :original => '300x400', :thumb => '120x120' }