title: wicked_pdf image rendering
body: <p>how do I get images of a product to show in pdf?</p>
  
  <p>I have this code in view file </p>
  
  <pre><code>&lt;div id="img-slide"&gt;
      &lt;% for asset in @car.assets %&gt;
      &lt;%= image_tag(asset.asset.url(:medium)) %&gt;
      &lt;% end %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and it shows all images for this car. </p>
  
  <p>but if I use the same code in show.pdf.erb then instead of images I got only question marks.. like the image missing thing.
  So, is there a way to get them on paper? Thanks.</p>
  
  <p>p.s. there is what console is showing</p>
  
  <pre><code>***************WICKED***************
    Asset Load (0.2ms)  SELECT `assets`.* FROM `assets` WHERE (`assets`.car_id = 29)
    Carmodel Load (0.2ms)  SELECT `carmodels`.* FROM `carmodels` WHERE `carmodels`.`id` = 28 LIMIT 1
  Rendered cars/show.pdf.erb (255.2ms)
  "***************/usr/bin/wkhtmltopdf       -q - - ***************"
  </code></pre>
  
  <p><strong>update</strong></p>
  
  <pre><code>&lt;%= pdf_image_tag('/public/system/assets/163/medium/2011_lincoln_navigator_l_angularfront.jpg', :style=&gt;"margin:0px;padding:0px", :width=&gt;"300", :height=&gt;"240")%&gt;
  </code></pre>
  
  <p>this code shows how the link should look like in html, with this code I can render one photo of the car, but it will be the same for all cars, so I didn't do much.</p>
  
  <p>the 163 number is the id of assets that is assigned to car, here I keep one image with more sizes(thumb, medium, large..) and I got 5 maps with different numbers for one car. So I have lots of maps with numberes like this as I have at least 5 photos for each car. each car have 5 assets. In show.html I can see them, but not in pdf. I did put this in application helper:</p>
  
  <pre><code>def pdf_image_tag(image, options = {})
    options[:src] = File.expand_path(RAILS_ROOT) + '' + image
    tag(:img, options)
  end
  </code></pre>
  
  <p>but this is only for images that you have on your server and will be the same for all cars, how can I get at least one image of each car to show in pdf? Pleaseeeee. help!!!</p>