[TYPO3-dev] Fluid and images resized automatically

Frans Saris franssaris at gmail.com
Mon Jun 8 14:44:58 CEST 2015


Hi Florian,

are you sure the provided snippet is correct?

<f:image src="{f:uri.image(src:
'EXT:myext/Resources/Public/images/logo.png')} " alt="Alt text"/>

looks a little but to much to only render an static resource image. First
using the uri.image viewhelper to create a url that you feed the image
viewhelper. That could be done without the uri.image viewhelper. But I also
see you want to render a static resource. In that case you should avoid
using the image viewhelper (the Image and uri.Image viewhelper use the FAL
API but that isn't needed for static resources).

try:

<img src="{f:uri.resource(path:'images/logo.png',
extensionName:'Myext')}"  alt="Alt
text />

gr. Frans

Op ma 8 jun. 2015 om 13:00 schreef bernd wilke <t3ng at bernd-wilke.net>:

> Am 08.06.15 um 12:31 schrieb Florian Rival:
> > Hi everyone,
> >
> > I have a problem with an image in a fluid template, the image is
> > automatically resize and I don't want that.
> >
> > Here is the Fluid code :
> >
> > <a href="{v:site.url()}" tabindex="1">
> >      <f:image src="{f:uri.image(src:
> > 'EXT:myext/Resources/Public/images/logo.png')} " alt="Alt text"/>
> > </a>
> >
> > and the result is :
> >
> > <a href="http://xxx.com" tabindex="1">
> >      <img alt="Alt text"
> > src="typo3conf/ext/myext/Resources/Public/images/logo.png" height="58"
> > width="404">
> > </a>
> >
> > Who have an idea where height and width are taken from ?
> >
>
> in general from the image, but there could be some global configuration
> restricting images to a maximum in width or height.
>
> bernd
> --
> http://www.pi-phi.de/cheatsheet.html
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>



More information about the TYPO3-dev mailing list