Compressing Images uploaded using CarrierWave
imkarthikk opened this issue · comments
Compressing strings works perfectly with lz4. But I'm having trouble compressing images.
I've uploaded the image using CarrierWave gem. Here's how I display the image:
<%= image_tag profile.avatar_url %>
But when I try to compress using: <% comp = LZ4::compress(profile.avatar) %>
,
it throws this error, " undefined method `bytesize' for #AvatarUploader:0x007fa1aaec49f8 ".
I've posted this on StackOverflow but no one has gotten back to me in the past week. I'd be happy if you could help me out on this! :)