Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi! I've been trying implementing the cropper. Everything works up to a point :)
I've set up a special media type. When I upload an image the crop is handled nicely and the crop is beautifully saved to the file system. But strange things happen when I use TinyMCE to insert that image. Somehow the size gets confused.
When I upload an image that doesn't need to be cropped (file dimensions are within the allowed values) everything is fine. No strange things happen when I insert the image through TinyMCE.The shown dimensions are correct.
When I have to crop an image the confusion starts. The image is cropped to 438x254. On the file system it really is 438x254. It shows up in the image picker from TinyMCE as being 469x263. Now... that confuses me a bit...
Can anyone point me in the right direction? It was nice to spend the whole sunday trying to find a solution. But now it's time to move on :)
I have not used the cropper in the media section but I'm pretty sure I see what the problem is. When the image is first uploaded some auto-magic fills in the umbracoWidth and umbracoHeight fields. I imagine these are the values used by TinyMCE.
This happens when the image is uploaded, but not when the image is cropped.
Sorry I don't have a simple solution ready for you.
I would have to ensure the correct values set upon Crop. (but crop does not call anything that could trigger an appropriate event in umbraco.)
As a work-around you could set those values manually, (tell me if that fixes it) but that's not cool for a propper job :-]
Thanks for your reply. I'll do some testing and will post my findings here!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted