Images with "itok" style tokens are not rendered.

Created on 13 April 2023, over 1 year ago
Updated 26 March 2024, 8 months ago

Problem/Motivation

Images are provided to the view by Drupal with tokens added for security reasons ie: path-to/image.jpg?itok=2734673.

These images do not seem to display in views generated by this module. Accessing the raw filname via a Views relationship and linking directly to the filname in custom does work, but since Drupal 8/9/10 creates month/year directories to put files in, we can't reliably link to just a filename.

This can be worked around by allowing insecure image links by adding following line to settings.php

$config['image.settings']['suppress_itok_output'] = TRUE;
$config['image.settings']['allow_insecure_derivatives'] = TRUE;

Steps to reproduce

Include content with an image field in the the view.

Check the pdf output, no image is shown.

Add follwing to settings.php

$config['image.settings']['suppress_itok_output'] = TRUE;
$config['image.settings']['allow_insecure_derivatives'] = TRUE;

Rebuild cache and check PDF view.

Image is shown as expected.

Thanks

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia joewickert

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024