JotaMG
(Jota)
March 5, 2016, 10:37pm
1
Hi!
I'm trying to learn a bit with image scales in Plone 5.0.2
The
http://docs.plone.org/develop/plone/images/content.html
is a little confusing...
Image scales
Archetypes based content image scales is handled by plone.namedfile.
Dexterity based content image scales are handled by plone.namedfile.
Archetypes based content image scales is handled by plone.app.imaging.
Both packages offer the same traverseable @@images view which can be used from page templates and Python code to provide different image scales for image fields on content.
Isn't Plone enough confusing?
Well if I understand well,
http://yoursite/content/imageOne/image_preview
is for AT content types, with DX types the best (and only??) way is:
http://yoursite/content/imageOne/@@images/image/preview
is that right, or am I missing something?
(and if this is the correct way to scale images in templates, better add that to the docs)
vangheem
(Nathan Van Gheem)
March 6, 2016, 1:10pm
2
You're right.
@@images /image/preview should also work for archetypes though as well.
espenmn
(Espen)
March 7, 2016, 8:24am
3
it is worth noticing that image in the url is the name of the image field, so let's say you have two image fields, it could be like:
http://site/content/@@images/image/preview
http://site/content/@@images/anotherimage/preview
For the original scale it will be:
http://site/content/@@images/image
JotaMG
(Jota)
March 7, 2016, 7:33pm
4
Thanks, very usefull!
(and I think that should be in the docs)
do3cc
(Patrick Gerken)
March 7, 2016, 7:47pm
5
You mean here?
=====================
Image-like content
=====================
.. admonition:: Description
How to programmatically manipulate images on your Plone site.
.. contents :: :local:
Introduction
============
Plone supports image content in two forms:
* As stand-alone content type, images will be visible in the sitemap. This is
the case for the default ``Image`` content type, but you can create custom
content types with similar properties.
* As a field, the image is directly associated with one content object. Use
This file has been truncated. show original
That is a good idea!