Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've played with this sandbox project a bit, and it's leading the pack for me in the way of cropping tools. I'm not seeing any way to use it with the media module though. Not sure what would be involved there, but that would be awesome.
Obviously getting this promoted to full project status is a higher priority, but I figured I'd drop this here as a feature request.
Comment | File | Size | Author |
---|---|---|---|
#4 | include_support_for_media_module-1831570-4.patch | 2.91 KB | willvincent |
#2 | include_support_for_media_module-1831570-2.patch | 2.57 KB | willvincent |
#1 | include_support_for_media_module-1831570-1.patch | 2.07 KB | willvincent |
Comments
Comment #1
willvincent CreditAttribution: willvincent commentedI dug into this a bit further. As it turned out this is really easy to implement.
Here's a patch.
Comment #2
willvincent CreditAttribution: willvincent commentedPrevious patch only works with the 2.x branch of media module. This patch should work for both 1.x and 2.x branches.
Note: This patch is untested, I've been unable to get the 1.x branch of media working at all today for some reason, but this is the same approach that the javascript crop module takes for compatibility with media 1.x and 2.x.
Previous patch in comment #1 does for sure work, I exercised it pretty thoroughly.
Comment #3
willvincent CreditAttribution: willvincent commentedOk.. Not sure what was going on yesterday, but I finally got media 7.x-1.2 working again. Here's an updated patch that works with both the 1.x and 2.x branches of media.
Only difference between this and the patch in #2 is an if statement checking whether or not the image dimensions are available, and if not omitting that from the alt tag of the generated image markup that pointcrop works with. I've tested this now with both media-7.x-1.2 and media-7.x-2.x
Seems solid to me. Hope to see it included!
Comment #4
willvincent CreditAttribution: willvincent commentedForgot to attach the patch file in comment #3.
Comment #5
jdanthinne CreditAttribution: jdanthinne commentedWorking fine for me with Media 7.x-2.x, although the image should be resized (big images aren't contained in the Media popup window).
This module should be released, it's one of the best solution for smart cropping!
Comment #6
willvincent CreditAttribution: willvincent commentedAgreed, but it stalled in the project application queue, ultimately being auto-closed for no activity.
https://drupal.org/node/1820260