Bug #78879
closedInline usage of f:uri.image doesn't crop image
0%
Description
I'm using the flux:field.inline.fal field to add an image
When I use the tag version: <f:uri.image treatIdAsReference="1" crop="{image.crop}" src="{image.id}"/>
everything is fine.
When I use the inline version: {image(treatIdAsReference:1, crop: '{image.crop}', src: '{image.id}')}
I get the uri to the full image without cropping.
Updated by Frans Saris almost 8 years ago
- Status changed from New to Needs Feedback
What if you use {f:uri.image(image:image)}
The crop value is automatically fetched from the object by the viewhelper.
Updated by Anja Leichsenring almost 8 years ago
please try {f:uri:image(image:image)}
. That should take all settings from the reference into account.
Updated by Thomas Anders almost 8 years ago
{f:uri:image(image:image)}gives mo no output (and no error)
testet:
{f:uri:image(image:image)} {f:uri:image(image:{image})} {f:uri:image(image: '{image}')} <f:uri.image image="{image}"/>
all = nothing
Updated by Frans Saris almost 8 years ago
The same for <f:image image="{image}" />"
?
What kind of object is {image}
?
Updated by Thomas Anders almost 8 years ago
I'm not sure how to determine the object type.
<f:debug>{image}</f:debug> gives the following:
array(55 items) id => '1:/user_upload/29727801-Gesch-ftsmann-Silhouette-Avatar-Profilbild-Lizenzfre ie-Bilder.jpg' (89 chars) name => '29727801-Gesch-ftsmann-Silhouette-Avatar-Profilbild-Lizenzfreie-Bilder.jpg' (74 chars) extension => 'jpg' (3 chars) type => '2' (1 chars) mimetype => 'image/jpeg' (10 chars) size => '83080' (5 chars) url => 'fileadmin/user_upload/29727801-Gesch-ftsmann-Silhouette-Avatar-Profilbild-Li zenzfreie-Bilder.jpg' (96 chars) indexed => TRUE uid => '14' (2 chars) permissions => array(3 items) checksum => '5f5ba10322027b7664637d6bfe46382b' (32 chars) pid => '5' (1 chars) missing => '0' (1 chars) storage => '1' (1 chars) identifier => '/user_upload/29727801-Gesch-ftsmann-Silhouette-Avatar-Profilbild-Lizenzfreie -Bilder.jpg' (87 chars) identifier_hash => 'c7d45dd6e044806473317d5c5628368bba2fab53' (40 chars) mime_type => 'image/jpeg' (10 chars) sha1 => '03c17294b048c9298f61f90e261b6dc433c3e39e' (40 chars) creation_date => '1476884119' (10 chars) modification_date => '1476884119' (10 chars) folder_hash => '19669f1e02c2f16705ec7587044c66443be70725' (40 chars) atime => 1480847832 (integer) mtime => 1476884119 (integer) ctime => 1476884119 (integer) tstamp => '1480855996' (10 chars) crdate => '1476886160' (10 chars) cruser_id => '1' (1 chars) sys_language_uid => '0' (1 chars) l10n_parent => '0' (1 chars) l10n_diffsource => 'a:8:{s:5:"title";N;s:11:"alternative";N;s:4:"link&q uot;;N;s:11:"description";N;s:4:"crop";N;s:9:"uid_l ocal";N;s:6:"hidden";N;s:16:"sys_language_uid";N;}' (147 chars) t3ver_oid => '0' (1 chars) t3ver_id => '0' (1 chars) t3ver_wsid => '0' (1 chars) t3ver_label => '' (0 chars) t3ver_state => '0' (1 chars) t3ver_stage => '0' (1 chars) t3ver_count => '0' (1 chars) t3ver_tstamp => '0' (1 chars) t3ver_move_id => '0' (1 chars) t3_origuid => '0' (1 chars) file => '15' (2 chars) title => 'Titel Blah' (10 chars) width => '1299' (4 chars) height => '1300' (4 chars) description => NULL alternative => 'Alternativer Text' (17 chars) categories => '0' (1 chars) sorting => '256' (3 chars) uid_local => '15' (2 chars) uid_foreign => '25' (2 chars) tablenames => 'tt_content' (10 chars) fieldname => 'bild' (4 chars) sorting_foreign => '1' (1 chars) table_local => 'sys_file' (8 chars) crop => '{"x":165.57814871016694,"y":398.1196246100543,"widt h":900.823975720789,"height":240.48254931714717,"rotate& quot;:0}' (110 chars)
The Object is made with Flux:
<flux:field.inline.fal name="image" required="true" showThumbs="true"/>
and the image-output:
{v:content.resources.fal(field: 'image') -> v:iterator.first() -> v:variable.set(name: 'image')} <f:image class="imageoutput" treatIdAsReference="1" src="{image.id}" title="{image.title}" alt="{image.alternative}" crop="{image.crop}"/>
The "crop"-value is set with the backend image manipulation editor.
Updated by Frans Saris almost 8 years ago
Looks like {f:uri.image(crop: image.crop, src: image.id)}
should work for your use-case. treatIdAsReference:1,
isn't needed as the id is the identifier of the file itself and not of the reference.
What exact version of TYPO3 are you using? Latest of the 7.6 branche?
Updated by Thomas Anders almost 8 years ago
{f:uri.image(crop: image.crop, src: image.id)}
works!
I'm using the 7.6.14
For me the documentation seems not clear enough to solve this on my own :)
Thank you!
Updated by Frans Saris almost 8 years ago
- Status changed from Needs Feedback to Closed