Alessio Dal Bianco
Alessio Dal Bianco

Reputation: 990

There is a way to *exact* resize on-the-fly an Image Object in Plone?

Just for be clear, this method is not what i'm looking for:

<img tal:define="scale context/@@images"
 tal:replace="structure python: scale.scale('image', width=42, height=42).tag()" />

In fact this method resize an ImageField. I want to resize an Image object to a specific and exact resolution without ratio. Any way to do this ?

--edit--

The Image object for me is one of the items showed in portal_types on the ZMI. In a few words i want the same behaviour of the code above, but on Image type.

Cheers, Alessio

Upvotes: 3

Views: 244

Answers (1)

Jon Stahl
Jon Stahl

Reputation: 2090

Image objects contain an image field, which can be resized. But you cannot resize the image object itself, that wouldn't make any sense. You can define any number of custom image resizes (which will affect the image fields in Image objects) in the control panel. You can't resize images freely on the fly, though.

You can use an add-on product like ImageEditor (http://plone.org/products/products-imageeditor) to provide arbitrary image editing/resizing to end-users. It's very useful, but may not be what you need.

Upvotes: 4

Related Questions