Getting the original image from a scale

If I have the url of a SCALE of an image, is there a way to find the 'original' ?

Let say there is a News Item with an image:

So we can render the image with:

This would output as something like:

SO: if I know only //path/to/item/@@images/f943af26-08.jpeg, is there any way I can know that the original image is:

does this help?

1 Like

Not really:
As long as I know the original items, I can find 'all kinds of stuff',

BUT: when I only know the rendered html (to be used with collective.lazysizes), I do not find any way of knowing that

comes from

and not:

If the 'scale itself had something to give me the name of the field, that would be 'enough' , for example if it had a method:
'getFieldName' that returned 'image' or 'myimagefield' etc.

1 Like

the scale view multi adapter has a getInfo method which gives you the UID, together with the extension from the mime type you can construct the name.

1 Like

I have successfully managed to find it now, but with collective.lazysizes, I am now looking into another approach:
I would like the scale view to accept more paramethers (like if it is 'responsive / support for retina 1x 2x image etc).... Will look into it further

NB retina images just got approved for merge into core