[TYPO3-ttnews] Is is possible to not set size on images

Erik Svendsen erik at linnearad.no
Tue Apr 22 22:19:15 CEST 2008


Hello Redvald,

> Have a design where everything is based on %. Is it possible to not
> set the px size on images in tt_news, so I can scale them in css
> instead?
> 
> redvald
> 

If you are setting the size in tt_news large enough, you could size them 
down with CSS. Else you can try as following in the root template.

plugin.tt_news.displaySingle.image.file.maxW >
plugin.tt_news.displaySingle.image.file.maxH >

Do the same for displayList and displayLatest.

But ther may be problems with the quality of images with css resizing (not 
so much with downsizing), and it makes the images big in bytes. Even if the 
size are for instance 150 x 150 px after resizing the kb will be the same 
as the orginal. If the orginal is a 800 x 533 it probaly will have a size 
of about 110 - 160 kb. With 3 to 4 images in a newsarticle the pag will be 
about 600 kb or more. I have seen websites who are using css-resizing which 
are about more than 800 kb and larger. A 150 x 150 image resized with IM/GM 
is about 15 kb.

So it's a good advice to try to have websites smaller than 150 kb. 

Else is not "good" webdesign these days to have "floating" width on sites. 
Nearly all new websites are using one width and grid-based layout.


WBR,
Erik Svendsen
www.linnearad.no




More information about the TYPO3-project-tt-news mailing list