Issue Bug Closed

#105403f:image and cache busting issue

Frank Nägler 10/23/24, 08:42 updated 11/14/26, 18:22

Description

Since version 13.4, the following fluid code:

<f:image src="{f:uri.resource(path: 'Images/logo.svg', extensionName: 'template')}" />

Creates an exception:

#1509741911 TYPO3Fluid\Fluid\Core\ViewHelper\Exception
Unable to render image tag in "pages:1": Folder "/_assets/862beb08718fcccbd31886444eef60f1/Images/logo.svg?1634931243/" does not exist.

When disabling the cache-busting in the uri.resource ViewHelper with (useCacheBusting=“false”) the issue is gone.
The problem is the <f:image> ViewHelper that cannot handle the URL with cacheBusting timestamp, in version 12 the same code works. Found while upgrading a version 12 project to version 13.</f:image>

Reviews 2

History 1014

  1. Georg Ringer commented <span data-processor="relativetime" data-value="2024-12-12T21:16:58+00:00" > 12/12/24, 21:16 </span>

    but why should someone do that and not use the native img tag?

  2. Benni Mack commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2025-04-09T17:08:28+00:00" > 04/09/25, 17:08 </span>

    Does this happen in FE or BE?

  3. Mathias Brodala commented <span data-processor="relativetime" data-value="2026-01-19T08:53:51+00:00" > 01/19/26, 08:53 </span>

    As mentioned quite a few times and in the docs, you must not use f:image for anything but FAL resources.

    Package resources should be rendered normally:

    <img src="{f:uri.resource(path: 'Images/logo.svg', extensionName: 'template')}">
  4. Georg Ringer commented and changed status Needs Feedback Closed <span data-processor="relativetime" data-value="2026-03-10T04:17:58+00:00" > 03/10/26, 04:17 </span>

    closing as lack of feedback and alternatives possible

  5. Gerrit Code Review pushed patch set 1 for main to change 95067 status Closed Under Review <span data-processor="relativetime" data-value="2026-08-02T14:35:18+00:00" > 08/02/26, 14:35 </span>

  6. Helmut Hummel commented and changed status Under Review Needs Feedback <span data-processor="relativetime" data-value="2026-09-03T12:21:57+00:00" > 09/03/26, 12:21 </span>

    Frank Nägler wrote:
    > Since version 13.4, the following fluid code:
    >

     <f:image src="{f:uri.resource(path: 'Images/logo.svg', extensionName: 'template')}" />

    From my understanding this Fluid code should not be supported by TYPO3 at all.

    f:uri.resource creates an URI and <f:image src= should, if anything, take a resource identifier and not a Resource URI

  7. Benni Mack commented and changed status Needs Feedback Closed <span data-processor="relativetime" data-value="2026-11-14T18:22:49+00:00" > 11/14/26, 18:22 </span>

    Thanks for the report, and sorry for the long silence.

    Passing the output of f:uri.resource into the src argument of f:image was never a supported use case: f:uri.resource returns a public URI (including the cache-busting query string), whereas src expects a resource identifier – a FAL identifier, a file uid or a path – not a URI. That it worked in v12 was a coincidence of how the path was resolved.

    Also note that the cache-busting part of the URI is not a stable format: with https://review.typo3.org/c/Packages/TYPO3.CMS/+/97627 it can be replaced by event listeners (e.g. with a content hash) or omitted entirely, so a generated URI is not something f:image can reliably resolve back to a file.

    There are two supported ways to achieve this:

    1. If the image does not need any processing, render a plain image tag:

    <img src="{f:uri.resource(path: 'Images/logo.svg', extensionName: 'template')}" alt="" />

    2. Since TYPO3 v14/v15, f:image (as well as f:uri.image) can handle extension resources directly via their identifier, including processing (width, height, crop):

    <f:image src="EXT:template/Resources/Public/Images/logo.svg" alt="" />

    As both options cover the use case, I am closing this issue. If you think there is still a scenario which is not covered, please let us know and we can reopen.