Project

General

Profile

Actions

Bug #68719

closed

Cropping Images in Backend, <f:uri.image> and <f:image> return different file urls

Added by Elmar Putz over 9 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2015-08-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.5
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

Description

Hi,

i'm using the new crop feature in the backend for image manipulation in the backend. The output gets rendered via fluid template and there seems to be a problem with referencing the correct (= cropped) version of the file.

Correct, cropped version of image:

<f:image src="{image.uid}"  treatIdAsReference="1" /> 

Incorrect output of path to original file (uncropped version)

<f:uri.image  src="{image.uid}"  treatIdAsReference="1" />

My Extension uses the following method for fetching image data:

 public function getImages($id, $tablename = 'tt_content', $imageField = 'image') {

        /* elp: if image field from tt_content is used */
        /** @var $fileRepository \TYPO3\CMS\Core\Resource\FileRepository */
        $fileRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\FileRepository');

        $images = $fileRepository->findByRelation($tablename, $imageField, $id);
        $imagesArray = array();

        /** @var $image \TYPO3\CMS\Core\Resource\FileReference */
        foreach ($images as $key => $image) {
            $imagesArray[$key] = $image->getReferenceProperties();
        }

        return $imagesArray;
    }

I guess, both methods should return the same URL?

Elmar


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #68421: Missing use statement in Uri/ImageViewHelperClosedFrans Saris2015-07-21

Actions
Actions

Also available in: Atom PDF