Bug #88341

Clean URL Problem with image

Added by Hans-Georg Althoff 2 months ago. Updated about 1 month ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-05-13
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Version 9.5.6
In an extension I have the following code line

<f:image class="detail" src="{plant.image.originalResource.publicUrl}" alt="Bild" width="294" onclick="popup('{plant.image.originalResource.publicUrl}');return false;"/>

with the code for popup
function popup(url) {
    var newImg = new Image();
    newImg.src = url;
    var args ='width='+ newImg.width +',height=' + newImg.height + ',status=no,scrollbars=yes,resizable=yes,location=no';

    fenster = window.open(url, 'popup',args);
    fenster.focus();
    return false;
}

If I click on the picture, a URL will be generated, which looks like
http://www.mydomain.de/Garten/fileadmin/..../picture.jpg

I get a 404 error, because the URL is wrong. The URL should not have "Garten" inside. It should be start with fileadmin.

History

#1 Updated by Georg Ringer about 1 month ago

  • Status changed from New to Needs Feedback

so what about just adding a / or maybe you should use the f.uri.image VH instead.

it also feels very wrong using f:image with src if you just could use <f:image image="{plant.image}"/>

Also available in: Atom PDF