[TYPO3] Re sizing images in an extension

Dmitry Dulepov [typo3] dmitry at typo3.org
Mon Jun 23 22:11:15 CEST 2008


Hi!

StephenBungert wrote:
> I have an extension that I'm writing that display's images. I want to use
> TYPO3's ability to resize images to display them smaller than they are, but
> so that they still look ok. 
> 
> I have discovered from looking at other extensions and from the mailing list
> that you can do this:
> 
> $imgConf['file'] = 'uploads/tx_sbportfolio/' . $imageName;
> 
> $imgOutput = $this->cObj->IMAGE($imgConf);
> 
> I can see the image on my website, but at its full size. How can I resize
> it? I saw in the tsref that the IMAGE object has a params property, I tried
> setting this, things like hspace worked, but width and height didn't.
> 
> How then do I resize the image?

Take a look to TSRef. TYPO3 can't do magic and guess what size you need. You have to set some properties. My album3x does that.

-- 
Dmitry Dulepov
E-mail: dmitry at typo3.org
Skype: callto:liels_bugs
TYPO3 technical: http://typo3bloke.net/


More information about the TYPO3-english mailing list