Osclass installations on modest hostings tend to provoke problems with PHP memory limit when the users try to upload images with big resolution (like those produced by modern phone devices). In most cases final images on your site won't have more than 640x480 pixels, so normally you have no real need to handle (and maybe permanently store in your server) such big images. This plugin will resize them to a much more manageable resolution on the client side, before they are sent to your server.

 

This way, to the user uploads are much faster, and to you as admin, it will save a lot of bandwidth and processing power.

 

By default the plugin sets the maximum resolution for pre-resizing to twice the max value set for "Normal size" in Admin Dashboard / Settings / Media (640x480 by default, so for pre-resizing it would be 1280). Until version 2.0.0 at this resolution some artifacts might be noticed in specififc circumnstances. Now thanks to the introduction of Pica library for better resizing, 1280 is more than enough unless you have special needs and wanted to show really big images to your users.

 

This plugin should be compatible with any theme that includes Ajax Uploader for images ("Click or drop for upload images").

 

Note: For this plugin to work, user browser must be fully HTML5 compliant. Old browsers such as IE9 and older will use the normal Ajax upload mechanism with no pre-resizing.

 

You'll need to slightly modify your theme, install the plugin and click on Configure (or Plugins / Pre-resize Images / Settings & Help) to change maximum resolution and see instructions.

 

Note: Currently this plugin replaces Fine Uploader module v. 3.8.0 bundled with Osclass with the latest v. 5.11.10, under MIT license.

 

Changelog:

 

Version: 2.1.0 (2017.01.21)

+ Fixed Drag & Drop images on Microsoft IE 11 / Edge (Thanks to developerchris :)

+ Restored "Make Primary Image" buttons (only on Publish Ad).

+ Fixed bug on Edit Ad when Decent Mobile Theme plugin is used.

Version: 2.0.1 (2016.12.23)

+ Fixed bug provoking output error on installing and other circumnstances

Version: 2.0.0 (2016.12.14)

+ Upgrade to Fine Uploader 5.11.10 (MIT license).

+ Much better resizing of images by using Pica library (MIT license).

+ Now images to be uploaded are fully sortable by dragging thumbnails.

+ Support for Decent Mobile Theme plugin.

+ Added languages folder for translation of plugin specific strings.

+ Fixed a bug affecting proper rotation of images including EXIF orientation.

- Discarded embedding of original EXIF information of the images.

 

Version: 1.1.2 (2016.06.13)

+ Embed original EXIF information of the images to avoid occasional validation problems on server side.

 

Version: 1.1.1 (2016.03.15)

+ Improved Make Primary Image layout.

+ Full translation of Ajax Uploader elements.

+ Fixed minor bugs

 

Version: 1.1.0 (2016.02.17)

+ Fine Uploader 5.0.9 (licensed under GNU GPL v3). Thanks a lot to dev101 for his support. :)

+ Added feature Change Primary Image (publishing page only).

+ Compatibility with Minifyer plugin.

+ Minor cosmetic change.

+ jQuery optimization

 

Version: 1.0.1 (2016.02.12)

+ Fixed several issues when user tries to upload more images than the allowed number.

+ Added support for some themes not using the standard Ajax Uploader mechanism.

+ Added a Plugins submenu for those having problems with Configure link.

+ Changed name of jquery.fine-uploader.min.js script to jquery.fineuploader.min.js

 

Version: 1.0 (2016.01.25)

 

+ Initial release

16 Reviews
Write a review

best plugin for image uploading problem
By sachin sharma, June 15, 2017
best work

Thanks developers
better that paid one
By Rasika Attanayake, April 01, 2017
better that paid one,very simple, i didnt change the codes coz i have osc [removed] it works ok
Sehr gut!
By Martin Kraushaar, January 28, 2017
Sehr zu empfehlen. Einfache Installation. Bilder werden schnell verkleinert. Optimal wenn es Probleme beim hochladen von Bildern gibt. Absolut zu empfehlen.
Great Plugin - Minor issues
By developerchris, January 02, 2017
Great Plugin with a few minor issues. Not compatible with IE 11 which is still in widespread use at the writing of this review.

Recommended!
Big thanks
By jhosua, December 21, 2016
this plugin very useful saving my disk space and make my image load time very faster.

    Stephen ...1 year ago

    hi i tried using this plugin but my images section when uploading ads appear blank.. please help ...
    hi
    i tried using this plugin but my images section when uploading ads appear blank.. please help
    my website is www.chapchapmarket.com

    teseo AUTHOR1 year ago

    Hi,

    Did you carefully follow the instructions on Settings & Help (Configure link or Plugins menu)?

    Stephen ...1 year ago

    i did everything but its not working..

    teseo AUTHOR1 year ago

    Please login in the Osclass forum and we can continue here:

    http://forums.osclass.org/plugins/(plugin)-pre-resize-images/

    Thunyas ...1 year ago

    in the preview is ok the orientation of the picture but when updated the listing is wrong orienta...
    in the preview is ok the orientation of the picture but when updated the listing is wrong orientation.
    I tried to make all what I read before but no result
    I asked the inmotion hosting to modify the order of extensions but if the picture is made by mobile and vertical shooting(not turned the phone)the picture under uploading is standing well in preview but after turn the wrong way.

    teseo AUTHOR1 year ago

    Hi,

    Try this:

    On index.php replace line 268:

    includeExif:true,

    with:

    includeExif:false,

    Please let me know if this solves your issue.

    Regards

    Thunyas ...1 year ago

    yes.thank.this solved the problem

    teseo AUTHOR11 months ago

    Next update will take this issue into account, thanks for your input.

    Regards

    gort11 months ago

    Why when I install the plugin disappears / or Drop Click for uploading images /?
    Why when I install the plugin disappears / or Drop Click for uploading images /?

    teseo AUTHOR11 months ago

    Hi,

    Did you carefully follow the instructions on Settings & Help (Configure link or Plugins menu)?

    gort11 months ago

    Yes, i follow the instructions

    teseo AUTHOR11 months ago

    Please give me the URL of your site so I can check it out

    STAR10 months ago

    Hi Can you please help after installing this plugin on my GumTheme it will not give me options to...
    Hi Can you please help after installing this plugin on my GumTheme it will not give me options to upload images

    my website www.OdSell.com

    Thank you

    lavaggista.it8 months ago

    hello, excuse me for my english. I have this PROBLEM: Fatal error : eccezione Uncaught 'eccezion...
    hello, excuse me for my english.
    I have this PROBLEM:

    Fatal error : eccezione Uncaught 'eccezione' con il messaggio '/home/marketc2/public_html/oc-content/uploads/temp/qqfile_58105194614f1.png non ESISTE!' in /home/marketc2/public_html/oc-includes/osclass/classes/ImageResizer.php:41 Stack trace: # 0 /home/marketc2/public_html/oc-includes/osclass/classes/ImageResizer.php(24): ImageResizer- > __ construct ( '/ home / marketc2 / ...') # 1 /home/marketc2/public_html/oc-includes/osclass/ItemActions.php(1387): ImageResizer :: fromfile ( '/ home / marketc2 / ... ') # 2 /home/marketc2/public_html/oc-includes/osclass/ItemActions.php(439): ItemActions-> uploadItemResources (Array,' 68 ') # 3 / home / marketc2 / public_html / oC-includes / osclass / controllore / item.php (236): ItemActions-> Modifica () # 4 /home/marketc2/public_html/index.php(97): CWebItem-> doModel () # 5 {main} gettato in / home / marketc2 / public_html /oc-includes/osclass/classes/ImageResizer.php on line 41

    teseo AUTHOR8 months ago

    Hi,

    Is this happening to you with any image, or only with PNG? :?

    Regards

    linkovaval7 months ago

    Hi guys. Sorry for my English, a very good plugin, lacking only the possibility of rotating image...
    Hi guys.
    Sorry for my English, a very good plugin, lacking only the possibility of rotating images. You plan to add this possibility?

    teseo AUTHOR6 months ago

    If you mean rotation on demand, that's not possible. However, regarding automatic rotation, a bug was introduced in a recent version (trying to address a rare issue with JPEG Exif information), so right now JPEG images including instructions to rotate the image are not being properly rotated. I'll fix this in the next update.

    Regards
    Regards

    Evgeniy6 months ago

    Hello Can you add the rotate of photos to plugin? Thanks
    Hello
    Can you add the rotate of photos to plugin?
    Thanks

    rob6 months ago

    This could be a repeat as I am not sure what happened to my first note as it seems it may have ti...
    This could be a repeat as I am not sure what happened to my first note as it seems it may have timed out before I sent it. So assuming this is not a repeat, I have two questions which will tell you I am a newbie.
    1. I am using the gum theme and have located ItemForm::ajax_photos(); in my item-post.php located at line 121. I will replace this file with
    if (function_exists('przi_ajax_uploader')) przi_ajax_photos();
    else ItemForm::ajax_photos();
    The existing text of ItemForm::ajax_photos(); does not start at the beginning of line 121 but is indented. Do I start the replacement text at the begining on line 121 or indented or does it matter? as long as I replace the line?
    2. I have found no other reference of ItemForm::ajax_photos(); in the item-post.php and no mention in the item-edit.php . Is this normal or have I missed some?

    teseo AUTHOR6 months ago

    Hi,

    1.- Indenting is not relevant, just there for better readability.

    2.- Seems that Gum theme has its own variant of ajax_photos() function, so you want to replace:

    GumItemForm::ajax_photos();

    with

    if (function_exists('przi_ajax_uploader')) przi_ajax_photos();
    else GumItemForm::ajax_photos();

    Regards

    rob6 months ago

    I have replaced the code with the following. I have included the line above and the line below what I installed . It is still not working? Does it look right to you?

    <?php if( osc_images_enabled_at_items() ) {
    if (function_exists('przi_ajax_uploader')) przi_ajax_photos();
    else GumItemForm::ajax_photos(); ?>
    <?php if(!$edit) { ?>

    teseo AUTHOR6 months ago

    Hm... Indeed seems to be a problem with Gum theme.

    Look, this Comments mechanism is not flexible enough to deal with this problem, please write a new post on this thread on Osclass official forum:

    http://forums.osclass.org/plugins/(plugin)-pre-resize-images/

    Regards

    buninsan6 months ago

    Hello. Sorry, I write through a translator. after the last update stopped working rss feed. I ha...
    Hello.
    Sorry, I write through a translator.

    after the last update stopped working rss feed.
    I had to be rolled back.

    teseo AUTHOR6 months ago

    Hi,

    Please write a new post on this thread on Osclass official forum:

    http://forums.osclass.org/plugins/(plugin)-pre-resize-images/

    Regards

    steam6 months ago

    Hi teseo, Thanks for great plugin! I have updated the plugin to version 2 and it gives me errors...
    Hi teseo,

    Thanks for great plugin!
    I have updated the plugin to version 2 and it gives me errors in Osclass 3.7
    I have tested php 5.6 and php 7

    Cannot modify header information - headers already sent by (output started at content\plugins\preResize_images\index.php:339

    Do you know what can happen?
    Thank you very much and Merry Christmas !

    teseo AUTHOR6 months ago

    Hi,

    Yes, sorry about that, a rogue space at the end of index.php. %( I've already sent an update 2.0.1 to the Market, but might take a while to be available for download. In the meantime, edit your index.php, erase the space after last tag ?> and you should be good to go.

    Regards

    steam5 months ago

    I downloaded and it works.

    Teseo thank you very much!

    Happy New Year!

    You may also like