veda-consulting-company / uk.co.vedaconsulting.mosaico

Other
39 stars 76 forks source link

Integrate image editing #447

Open larssandergreen opened 3 years ago

larssandergreen commented 3 years ago

It would be great to have some minimal image editing in Mosaico. Our users are doing things like cropping images before uploading in desktop image editing, but it would be so much simpler to have them just upload and crop, etc right in Mosaico.

I've done a little looking around and FileRobot looks good. I like that it allows cropping to pre-determined dimensions (16:9, 4:3, etc.) which would be pretty useful. Thoughts on if this might make sense or if there are better alternatives?

Mosaico itself uses MoxieManager, which is not open source (but FileRobot looks better to me anyways).

totten commented 3 years ago

That would be cool.

Could we designate a client-side API for Civi code that needs to launch an image-editor dialog. For example, either:

// JS-oriented
CRM.editImage({src: "...", onSave: function(){...}})

or

<!-- Angular-oriented -->
<crm-image-editor src="..." on-save="..." />

Doing that would mean (a) filerobot could be packaged as a distinct extension and (b) other UIs (like profile-image-uploads and traditional email composition) could leverage the same editor.

(I feel like @mlutfy had published something for editing profile images?)

MegaphoneJon commented 3 years ago

The extension Tim is referencing is Image Crop: https://lab.civicrm.org/extensions/imagecrop