Aqua Resizer

Not gonna write a long post here, since I already did a rather concise yet lengthy write-up about the script on WPExplorer.

What the script does basically is to resize and/or crop images from WordPress on-demand. It is easy to use, fast, secure and efficient.

One of it’s most important ingredients is the implementation of WordPress built-in functions, meaning it’s completely native. You know what that means – No more 777 folders, manual querying database for attachment id etc. Just feed in the url and you’re golden.

The script is now singing and dancing on Github so go grab it while it’s hot. If you have issues with it please, please, please post it on its Github issue page, and if the script saved your life please give me your sister’s contact no.

Cheers

P/S: Thanks to AJ for testing the script and for that awesome looking feature image. I hope you live up to 90 and have many kids.

Discussions — 33 Responses

  • Jakub Kohout May 8, 2012 on 10:10 am

    So with this I don’t have to do custom image_sizes like this?
    add_image_size( ‘blog_tree_column’, 358, 170, true); // Blog tree columns size

    Reply
    • Syamil Jakub Kohout May 8, 2012 on 10:38 am

      You are absolutely correct. :)

      Reply
      • Jakub Kohout Syamil May 8, 2012 on 11:27 am

        That’s really cool :) Really good job again :)

        Reply
  • Omar May 9, 2012 on 4:15 pm

    Syamil, this script is looking promising planning on using it on my next theme, just one quick question. How does the cache work? from what I’ve seen it puts the images in the native upload folders of WordPress but how often does it delete the images not being used?

    Reply
    • Syamil Omar May 9, 2012 on 6:24 pm

      Hi Omar,

      The script doesn’t do that unfortunately. The caching method is just basically handling the url of the already resized images instead of regenerating a new one on each page load, then it follows the default behaviour of how WordPress handle images.

      Reply
      • Omar Syamil May 9, 2012 on 7:14 pm

        Awww! still pretty good option I usually use timthumbs but its getting a bit messy lately. At least its still a better option then using then using add_image_size and having XXXX images you will never use!

        Reply
  • AJ Clarke May 10, 2012 on 3:58 am

    lol. thanks for “ps” dude!

    Reply
    • Syamil AJ Clarke May 14, 2012 on 3:18 am

      lol ;)

      Reply
  • Frank M May 13, 2012 on 1:36 pm

    This looks very promising. I’ve never been a fun of timthumb and add_image_size is a little messy. I’ll definitely give it a spin.

    Thanks for sharing.

    Reply
    • Syamil Frank M May 14, 2012 on 3:18 am

      Give it a go. You’re gonna like it. :)

      Reply
  • ramzes May 14, 2012 on 9:21 pm

    Thanks for nice script. We are going to use it in our future projects.

    Reply
  • Jinson Abraham July 15, 2012 on 3:43 am

    I have ditched timthumb and moved on to aqua resizer. Thanks for the wonderful script.

    Reply
  • William September 5, 2012 on 3:14 pm

    3 more queries per image, this script had tripled my queries >.<

    Reply
    • syamilmj William September 8, 2012 on 3:00 pm

      If you can offer a better alternative to getimagesize() and your method of benchmarking the performance, I’d love to hear it. The script is fast enough, but it’s not perfect. I’ve tested it with over 1000 recursive resizes *100 depth level and the server didn’t even blink.

      Reply
  • Vasili November 7, 2012 on 9:18 am

    Hey mate, i want to use ‘Multiple Post Thumbnails’ (i have integrated this plugin into the theme), it uses native WP function: the_post_thumbnail. Is it possible somehow to combine with ‘Aqua Resizer’?

    Reply
  • riesurya December 27, 2012 on 3:27 pm

    Hi Syamil,
    thanks for this great script. I beleive this feature should become WordPress core function :)

    greeting from Jakarta

    Reply
  • Alir3za December 30, 2012 on 8:50 am

    Hello , Nice work .
    In past i was working with Timthumb . Now , i’m going to using This cool Resizer .
    Thanks sir .

    Reply
  • Ionut February 7, 2013 on 7:16 pm

    Hy! i want to resize all images from my site to this size w:200px max-height:180px. I have setup the script, but i can’t figure out how to proceed forward. Can you help me, please? In wordpress dashboard i swich all images size to 0, to obtain one image, not three.

    Reply
  • Ionut February 11, 2013 on 1:03 pm

    I do not understand the wiki, that’s why I asked here. I will try to search on google for some answers, thanks.

    Reply
  • mailmilisku February 12, 2013 on 11:45 am

    This is a great plugin. Is it possible to combine feature image or first image in post as the thumbnail?
    In case user don’t set up feature image, automatically will use the first post image as thumbnail.
    Really appreciate for the simple code here. Thanks in advance.
    One of your theme on Themeforest, there is use the combination vode I pointed above?

    Reply
  • Willem March 10, 2013 on 12:21 pm

    Hi,

    Using the normal media settings in WP still saves the orignal ‘big’ file in my image folder. It is only ‘resized’ to use images in blogs and saves this sizes also into my image folder.

    What I want is when I upload a ‘big’ file, it resizes to a maximum width without saving the ‘big’ image file in my image folder.

    Is that what I can use this for?

    Kind regards

    Willem

    Reply
    • syamilmj Willem March 10, 2013 on 1:48 pm

      It doesn’t do that

      Reply
  • Victor Teixeira April 4, 2013 on 10:21 pm

    Great, I made something like this (https://core.trac.wordpress.org/ticket/15311) some years ago and was using it on every project. But now i had to update for the new image editor api… No more… thnaks

    Reply
    • syamilmj Victor Teixeira April 5, 2013 on 11:28 pm

      Hi Victor! Actually I was quite a fan of your vt_resize script, it’s really great to have you commenting here :)

      Reply
      • men's cologne syamilmj October 3, 2014 on 2:13 am

        Thanks for every other wonderful post. Where else could anyone get
        that kind of information in such an ideal method of writing?
        I’ve a presentation subsequent week, and I’m on the look for such information.

        Reply
      • Beatrice syamilmj October 20, 2014 on 6:05 am

        Greetings from Florida! I’m bored at work so I decided to browse your site on my
        iphone during lunch break. I really like the info you provide here and can’t
        wait to take a look when I get home. I’m surprised at how
        fast your blog loaded on my cell phone .. I’m not even using WIFI, just 3G ..

        Anyhow, awesome blog!

        Reply
  • Waqas December 6, 2013 on 3:39 pm

    I tested the plugin at localhost. But I didn’t get the point. It replaces the wordpress default add image size function, which works on the backend when making posts. But your scripts creates copy of image on page load. So which one is faster in terms of response time for visitor?

    Aren’t you replacing the function from backend to front end? Its ok to pass a functiona at backup where load time doesn’t matter. But on font-end your script it questionable :D

    Reply
    • syamilmj Waqas December 6, 2013 on 7:16 pm

      Hi Waqas,

      You’re right, the script runs on user request, but it only resizes the image once and then serve the URL thereafter – so the response time difference is negligible once the image has been resized.

      Reply
  • PrintingBig February 6, 2014 on 2:59 pm

    The theme we have uses this – and it seems to be overriding our defined image sizes and upsizing them to 100% width of the post or page. What is the fix?

    Reply
  • Nazakat June 12, 2014 on 3:30 pm

    How i can use AQUA RESIZER in links like when using timthumb, for example,

    ID), ‘large’ );
    $url = $src[0];
    ?>
    <a href="/timthumb.php?src=&h=180&w=120″> Link

    How can i achieve this using AQUA RESIZER

    Reply