Rails, attachinary and PDF thumbnails

Comments

1 comment

  • Avatar
    Itay Taragano

    Hi Kristen,

    Sorry for the very late reply, we have noticed that this request was left unattended. I guess this is not relevant anymore but for future reference -

    From your code, you use `p.path`. If the value of `p.path` is a full URL, then all of the transformation parameters will be ignored and that URL will be used in your `img` tag. You should make sure that only the public_id of the image is used there. Also, you'd need to also tell Cloudinary in which image format it should be delivered in, otherwise the original PDF would be delivered. Something like the following should work:

    = cl_image_tag "img_public_id", { size: '200x200', crop: :thumb, format: :jpg, class: "img-responsive thumbnail" }

    Thanks,
    Itay

    0
    Comment actions Permalink

Please sign in to leave a comment.