1

Topic: Async Image Uploads - Generating custom code on success

Hi, everyone!

I want to generate custom HTML code on image (Fancybox hightlight), when new Image was successfully upload.

So, I have two questions.

First question
My uploader script (postAcceptor.php) will check image width and if we have a big image, there will be generated two images with similar names, like 123.jpg and 123_prev.jpg. How script can tell to editor was that simple small image or big image with preview version?

Second question
In case with big images and previews, how editor can generate this code

<a class="fancybox" href="http://mysite.com/img/123.jpg">
    <img src="http://mysite.com/img/123_prev.jpg" style="width:500px;">
</a>

instead default this one?

<img src="http://mysite.com/img/123.jpg">

P.S. Sorry my english

Last edited by Tilk (2016-08-25 01:12:37)