core
core copied to clipboard
image presets can now be arrays
Image presets can now be organised better:
Model_Event_Image::TYPE_BANNER => [
'175x175' => [
'quality' => 100,
'actions' => [
['crop_resize', 175, 175]
],
],
'1250x750' => [
'quality' => 100,
'actions' => [
['crop_resize', 1250, 750]
],
]
],
Model_Event_Image::TYPE_AVATAR => [
'175x175' => [
'quality' => 100,
'actions' => [
['crop_resize', 175, 175]
],
],
...
Can you provide an update for the docs too?
This patch came from the following problem: I've faced the problem of the image storage organisation, I need to upload the images to CDN in particular sizes. Each type of image may have various sizes (for mobile version, desktop, various data representations, etc). Adding array as an argument to the preset loader allows to loop through the presets and process images in a more simple way.
Yes, I can sure can update docs. Will do.
Thanks.
Now the only thing still missing is
Yes, I can sure can update docs. Will do.
This new feature has to go in https://github.com/fuel/docs/blob/1.9/develop/classes/image.html somewhere.
I haven't seen a PR for this yet?