I am working on a new image dialog plugin. The goal, Part1- insert new image, if you resize it via the height and width settings, a thumbnail is generated and saved.
This is working for me with one bug.
If I insert a new image and size it, it works fine. But, if I edit the photo and change the size again, the image preview is loaded with the "thumbnail" photo. If you continue to decrease the size, it is fine, but if you increase it the picture is pixalated. This only effects the preview image and not the actual image after you hit ok.
This entire plugin is a modified copy of the original image dialog. I can not seem to find where the image preview img tag gets its src info entered. Once I can edit that, I can strip out the extra src info I am inserting for the thumbnail.
eg.
// as thumbnail <img src="thumbnailer.php?img=images/completedProjects/68coronet-01.jpg&w=108&h=81" alt="" /> // original file <img src="images/completedProjects/68coronet-01.jpg" alt="" />
The second half of the plugin will automaticaly generate the link so you end up with an image insert that looks like this
<a href="images/completedProjects/68coronet-01.jpg" class="lightbox"><img src="thumbnailer.php?img=images/completedProjects/68coronet-01.jpg&w=108&h=81" alt="" /></a>
I have not got that far yet. I want to fix the image preview first.
The original, uncompressed image plugin file is here
Once I am done, this will get posted free to use in the plugin section
Re: help with image dialog
the preview is using the "data-cke-saved-src" attribute, not the "src" attribute.
And the attribute needs to be edited in the "onShow" section.
Now to auto create the link element. . .