smart-media icon indicating copy to clipboard operation
smart-media copied to clipboard

Allow custom crops per insert.

Open peterwilsoncc opened this issue 6 years ago • 1 comments

It would be helpful to allow two modes of custom cropping:

  • Global crops (as is currently the case, stored in the attachment's post meta)
  • Local crops affecting only the current insert in to the post.

Using this image as an example:

Image from the hit musical Dear Evan Hansen

For a story about the Tony Award® winning Ben Platt, I may wish to use this crop:

Image of Tony Award® winner Ben Platt from the hit musical Dear Evan Hansen

Whereas for a story about the Tony Award® winning Rachel Bay Jones, I may wish to use this crop:

Image of Tony Award® winner Rachel Bay Jones from the hit musical Dear Evan Hansen

peterwilsoncc avatar Apr 29 '19 00:04 peterwilsoncc

Agreed. Right now it's a really tricky as we're not storing the tachyon image URL in the content as of the latest tachyon plugin version. I'll need to double check that the "allow in admin" override doesn't circumvent it but pretty sure that's now the case.

We'd need to support the addition of query parameters to individual image URLs inline and also make sure they're supported and merged properly either in this or the tachyon plugin.

I think we'd need to filter the image components of Gutenberg to support this.

This is partly related to #8 as well - there's a built in Gutenberg component we could use.

roborourke avatar Apr 30 '19 16:04 roborourke