Image not displaying in Wicked PDF generated PDF in Rails

45 Views Asked by At

I'm facing an issue where the image border is being displayed in the PDF generated by Wicked PDF in my Rails application, but the actual image content is not showing up. I've confirmed that the images are storing properly in the database, but they are not rendering in the PDF. Here are the relevant details:

\<% if @ledger_book.persisted? && @ledger_book.purchase_sale_images.attached? %\>

      <h4>Images:</h4>
      <% @ledger_book.purchase_sale_images.each do |image| %>
        <%= wicked_pdf_image_tag rails_blob_path(image, only_path: true), width: '200', height: '150' %>
      <% end %>

\<% end %\>

Moreover the complete pdf page is showing except the image, kindly let me know how to solve it.

0

There are 0 best solutions below