Reputation: 2563
Hi i'm trying to resize an image to a size of width 1135px and auto height
(so that i can resize it in css) . and for this i'm adding following line in uploader
version :large_cover_photo do
resize_to_fit(1135, 10000)
end
Same goes for .
version :large_cover_photo do
resize_to_fit(1135, 0)
end
version :large_cover_photo do
resize_to_fit(1135, nil)
end
Even if i specify to 300px height in uploader. it does not work
This is resizing image to width 1135px
but height not working accordingly . and if i try to resize height through css , it's making significance difference on width too . kindly have a look on images attached
This second image is when i resize it through inline css(not touching widht in css)
Upvotes: 1
Views: 1559
Reputation: 2563
version :large_cover_photo do
process resize_to_fill: [1135,300]
end
Note the key word process it will do the trick
Upvotes: 1
Reputation: 727
According to carrierwave's documentation here, I think you should use Square Brackets [ ] instead of usual brackets () when defining versions, So your code should be like...
version :large_cover_photo do
resize_to_fit: [1135, 10000]
end
Upvotes: 0