Feature #77532
closed
Epic #77810: Improve (responsive) image handling
Add possibility to define multiple croppings per image
Added by Joe Jones over 8 years ago.
Updated about 6 years ago.
Category:
Backend User Interface
Description
The current implementation of the cropping tool does just support one cropping area.
For future features like "cropping area per viewport" we need the possibility to define multiple cropping areas.
This could be done on a key basis. So you can define multiple cropping keys and define a cropping area for each key.
For example:
The image is 100px100px
Cropping keys:
- mobile: y 10, x 10, w 40, h 40
- tablet: y 10, x 10, w 60, h 60
Original Ticket Text:
Dear BE-Team,
it would be great to create different edits of one resource media file. The cropping feature is great, so it would be a great topping not to refer a media file twice to get two different cropping areas (e.g. headerimage and menuimage of the same > keyimage) but add a second edit of the media file.
Best wishes
Martin
- Subject changed from More Edits of one Image (Crop and future features) to Add possibility to define multiple croppings per image
- Description updated (diff)
- Category set to Backend User Interface
- Status changed from New to Accepted
- Assignee set to Sascha Egerer
- Parent task set to #77810
Currently the crop is stored in the sys_file_reference table in the 'crop' field as a json value: {"x":55.81250000000001,"y":83.88500000000002,"width":570,"height":248.52,"rotate":0,"scaleX":1,"scaleY":1}
We can store up to 4000 characters in that field.
If we add the crop key name to the example crop value above, we get around 117 characters using the key name 'default'. So when we do a preservative estimate of 200 chars for a crop, the field can hold 20 cropings.
Michiel Roos wrote:
Currently the crop is stored in the sys_file_reference table in the 'crop' field as a json value: {"x":55.81250000000001,"y":83.88500000000002,"width":570,"height":248.52,"rotate":0,"scaleX":1,"scaleY":1}
We can store up to 4000 characters in that field.
If we add the crop key name to the example crop value above, we get around 117 characters using the key name 'default'. So when we do a preservative estimate of 200 chars for a crop, the field can hold 20 cropings.
I think that should be enough. If not you can extend the fieldsize...
- Status changed from Accepted to Under Review
Hi guys,
Multiple cropping is only a little part of the problem.
What if i want different quality for each size ?
What if i have 12 breakpoints ?
What if i want different images for each breakpoint ?
Multiple cropping is a great feature,
but multiple file reference with all feature allready
available for each one is probably a far better way to go !
(and easyest too)
All pieces are allready here, it only require a rendering method
witch take care of taking x sources and render a single
picture srcset or whatever data attribute.
Maybe grouping files references as a srcset could be a viable option ?
- Status changed from Under Review to Resolved
- Status changed from Resolved to Closed
Also available in: Atom
PDF