I am using the auto_html gem to embedd images and videos in my rails app. But I ‘ve got a small problem. Is there a way to resize the images to a predefined size?
Thanks in advance
lg tabaluga
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could create a new filter for images, and add the filter in an initializer after requiring the auto_html gem. The filter might look as follows:
This is untested, as I do not currently have terminal access, but should work or at least get you pointed in the right direction. Good luck!