0
votes

I've upgraded an ext. from TYPO 6.2 to 8.7 based on the fe_users table. But now image is not showing - only an id. Name and other information are showing correct.

How do I convert the uid to image path? I have followed the instructions on https://fluidtypo3.org/viewhelpers/fluid/master/ImageViewHelper.html

the result is

This is my code

    <f:for each="{feUsers}" as="feUser" key="number" iteration="itemIteration"> 
 <div class="feuser">       
  <f:if condition="{feUser.image}">
    <f:image
     treatIdAsReference="1"
     src="uploads/pics/{feUser.image}"
     title="{feUser.name}"
     alt="{feUser.name}"
     maxWidth="159"
     maxHeight="220"
     width="159c"
     height="220c"
     crop="true"
     cropVariant="default"
    />
   </f:if>
 </div>
</for>
1
Can you please post your TCA configuration of the image field in fe_users table? - Oliver Hader
Try using src="{feUser.image}" (without the path) in case your images in uploads/ have been migrated to the FAL storage at fileadmin/ (or any other FAL storage). - Oliver Hader
I have no TCA configuration in my extension for the image field in the fe_users table. Should I have that? - stig
src="{feUser.image}" the result i src="1" - stig

1 Answers

0
votes

you have mixed multiple possibilities:
it is about your first two parameters:

<f:image
  treatIdAsReference="1"
  src="uploads/pics/{feUser.image}"
  :

if you want to use the FAL-id don't add an path (as said by Oliver Hader)

but the better option would be to avoid also the uid and use objects.

In the reference you mentioned you find the attribute image which needs an object in the value. so you should use:

<f:image
  image="{feUser.image}"
  :