Skip to content

Conversation

@mumnik
Copy link
Contributor

@mumnik mumnik commented Oct 9, 2020

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]
				],
			],
...

@WanWizard
Copy link
Member

Can you provide an update for the docs too?

@mumnik
Copy link
Contributor Author

mumnik commented Oct 10, 2020

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.

*
*/

return array(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding standards, no short array notation please.

@WanWizard
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants