Hello,
Views generates the error "Unable to get image" when I try to generate a PDF. The URL of the image is correct, but it has "?itok=Q820pdAp" at the end and I think this is the problem. The image is in a image field.
Thanks

Comments

bigcrunch’s picture

I've read this about Drupal 7.20 updates. I've Drupal 7.28 but adding $conf['image_allow_insecure_derivatives'] = TRUE; to my settings.conf solved the problem (but I have a security risk now).
Is it a compatibility issue from Views PDF?

vegansupreme’s picture

bigcrunch,

Are you using private filesystem or other access control? This is the only image related issue I know about with Views PDF—it accesses images as anonymous.

bigcrunch’s picture

I use Taxonomy Access Control, but not in this nodes (I use it in forums).

vegansupreme’s picture

I'm pretty sure if the images in question are in private filesystem you need to explicitly allow anonymous access. I use image_style_access. Private_files_download_permission also works.

bigcrunch’s picture

Images are public accesible. I think the probles is the "itok" parameter in the URL of the images, but It was included by Drupal. I'm not sure if the problem if from Views PDF or Image field.

bigcrunch’s picture

I found a solution here: Replace 'image_style_path' with 'image_style_url' in modules/image/image.admin.inc.
So I think is not a Views PDF bug, sorry and thanks for your help.

vegansupreme’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

mabho’s picture

I don't know if this may help someone, but I will share my experience troubleshooting a problem with images not showing on the final PDF file. Everything worked fine for me when generating PDF files, except for the fact that images weren't being shown. The space where images should appear would display as blank/empty. The same issue did not occur when I used the server IP address instead of the DNS. It turns out there was a server misconfiguration and the website DNS couldn't be 'seen' from within the server itself (ping www.xpto.com would throw the message 'ping: uknown host www.xpto.com'). By fixing this issue, the script was able to 'pull' and use the images.