kreeti / kt-paperclip

Easy file attachment management for ActiveRecord
Other
275 stars 94 forks source link

Webp image upload issue #101

Open SRIKANTHAR opened 1 year ago

SRIKANTHAR commented 1 year ago

webp images upload not supported it's giving this error message when trying to upload webp images has below

avatar_2_3_webp = open(image_ur)

at paperclip method "open" we are getting this error

ImageSpec::Error (#Paperclip::Tempfile:/tmp/18c5a2261d1d178068acb724a8a967b720221108-1242657-rpwwg520221108-1242657-n7zd3k.webp is not a supported image format. Sorry bub :():

we are using Rails 4.2 and ruby 2.3.0 paperclip (4.2.4) paperclip-compression (0.3.11) paperclip-optimizer (2.0.0) ImageMagick 6.9.10-23

please help on this to how to fix this issue

SRIKANTHAR commented 1 year ago

Full error like this please help on this to solve

Command :: PATH=/usr/bin/:$PATH; file -b --mime '/tmp/77d3665c3781984fe5e4214e177c662520221114-851123-ylizjj.webp' Command :: PATH=/usr/bin/:$PATH; identify -format '%wx%h,%[exif:orientation]' '/tmp/77d3665c3781984fe5e4214e177c662520221114-851123-2qabaq.webp[0]' 2>/dev/null

Command :: PATH=/usr/bin/:$PATH; convert '/tmp/77d3665c3781984fe5e4214e177c662520221114-851123-2qabaq.webp[0]' -auto-orient -resize "1000x" -crop "1000x1000+0+0" +repage -quality 30 -interlace Plane '/tmp/77d3665c3781984fe5e4214e177c662520221114-851123-2qabaq20221114-851123-h925u5.webp' Completed 500 Internal Server Error in 1921ms

ImageSpec::Error (#<Paperclip::Tempfile:/tmp/77d3665c3781984fe5e4214e177c662520221114-851123-2qabaq20221114-851123-h925u5.webp> is not a supported image format. Sorry bub :(): app/helpers/media_helper.rb:582:in create_media' app/controllers/media_controller.rb:395:increate'

ssinghi commented 1 year ago

@SRIKANTHAR you perhaps need to install webp libraries for imagemagick.

ssinghi commented 1 year ago

@SRIKANTHAR did it resolve the issue? Should we close it?