-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Index all image scales, no matter the actual size #140
Comments
Tough one. The catalog info is mainly there for when you display images in listings. I don't like to have info in there for scales that are larger than what you actually get. It is not much use listing ten scales in a source set when the biggest five of them are completely the same. Fair point though that you would like to avoid complicating a template with logic to try to show the highest available scale. Still, wouldn't it be okay to say in a template: use the |
|
I mean, it could work, but what I wanted to state is the difference between the image scales information we are saving (and exposing through the REST API) in the catalog metadata and what we are exposing in the content itself. Any opinions on this @plone/restapi-team? |
My opinion: It's a bug that the serialization of an image field includes scale sizes larger than the original image. Probably this serializer needs to be updated to get the scales the same way as the catalog does (using an IImageScalesFieldAdapter). |
I find inconsistent that we index in the catalog metadata just some scales for an image and then requesting to the plone.restapi endpoint receiving all URLs for all configured image scales.
For instance:
This is the restapi response:
https://2023.ploneconf.org/++api++/accomodation/1111_fotpe1_fachada.jpg
But this is the restapi response when searching for the same item:
https://2023.ploneconf.org/++api++/@search?path.query=accomodation/1111_fotpe1_fachada.jpg
I would find much more consistent to have all of them indexed in the catalog too, otherwise the REST API user (in our case when building a Volto site), needs to do a lot of checks like "if this item hasn't the scale named
large
use the one namedpreview
and if notmini
, etc.)The text was updated successfully, but these errors were encountered: