19 Responses

  1. Konstantinos Kouratoras
    Konstantinos Kouratoras November 28, 2012 at 12:22 | | Reply

    Thank you for this great plugin! But check the github link, it’s broken.

  2. Tim
    Tim November 28, 2012 at 13:40 | | Reply

    For now, the GitHub URL appears to be here:

    https://github.com/MatthewRuddy/Wordpress-Timthumb-alternative

    1. Matthew Ruddy
      Matthew Ruddy November 28, 2012 at 15:27 | | Reply

      Thanks. A Github frontpage has been created as well. See:

      http://matthewruddy.github.com/Wordpress-Timthumb-alternative

  3. Kevin Remisoski
    Kevin Remisoski November 28, 2012 at 14:36 | | Reply

    To my knowledge it’s been over a year since timthumb was last exploited and I haven’t seen any security issues listed on the timthumb google code page. With that being said, what would be the benefit of using a script that hasn’t been tested for exploits and is new as opposed to using a script that has been tested and patched?

    1. Matthew Ruddy
      Matthew Ruddy November 28, 2012 at 15:23 | | Reply

      Good question. The Timthumb vulnerability came from the ability to use images from external, untrusted sources. Only a select few ‘trusted’ sources were supposed to be allowed; flickr.com, blogger.com, but a particular section of code didn’t prevent a user from using a file from a domain such as ‘flickr.com.hacker.com’, etc. This gave them access.

      The function I’ve created loads the file locally as a resource before it starts the resizing. This requires the absolute path to the image, which obviously won’t work with an external image. The function will fail. You could also add a little snippet of code to the top of the function to check the current images domain against your WordPress sites domain, to be extra safe.

      That said, you are correct about Timthumb being pretty safe as of recent. However, hosts still send out vulnerability reports to users when even the most up to date version is used. I found this out the hard way when customers using Bluehost came flocking to me about an email they received saying Riva Slider used Timthumb and therefore they were at risk. The email said it has updated Timthumb to the most recent version for them, even though it was the same version as before!

      It may be safe at the moment, but the scare mongering still exists. I still often get asked if Riva Slider uses Timthumb before users purchase. When users who don’t fully understand the logistics of the previous vulnerability hear about the potential threat, they are hard to convince otherwise.

      Plus, some hosts blatantly block Timthumb. There can also be a lot of permission errors and 400 errors on various hosts. This function tends not to suffer from those issues. Put simply, if the ‘uploads’ directory has safely been created with the WordPress install, and you can upload to the Media Library fine, this function should work.

  4. Kill Hipsters
    Kill Hipsters December 10, 2012 at 06:00 | | Reply

    Just a minor annoyance, but the function name is too long. Did you really have to prefix the function with your first and last name? Why not, “better_image_resize” or “secure_image_resize” instead? Just feels silly and unnecessary is all using your name. Other than that, tested this and it works well, so thank you.

    1. Matthew Ruddy
      Matthew Ruddy December 10, 2012 at 10:52 | | Reply

      The long prefixed name makes sure it doesn’t collide with a function that may be called “image_resize”. Probably a bit much but better safe than sorry. Feel free to change it in your projects ;)

    2. Adam
      Adam January 20, 2013 at 06:28 | | Reply

      I agree, which is why I renamed this function to “mr_image_resize”, “mr” as in “mister” but which also happens to perfectly match his initials instead of the overly long function name.

  5. mbrem
    mbrem December 14, 2012 at 01:32 | | Reply

    Interesting issue since the release of WP 3.5, only the fist slide show in RSP displays. The others on the site endlessly load unless I uncheck ‘resize images’. Is this a unfortunate problem with 3.5 now?

    1. Matthew ruddy
      Matthew ruddy December 14, 2012 at 02:16 | | Reply

      Probably an error of some sort. 3.5 has been tested with 3.5 betas and appears to be working fine. Fire an email to info@matthewruddy.com and we can resolve it there :) probably something simple we can resolve quickly :)

  6. stefaan
    stefaan April 13, 2013 at 01:07 | | Reply

    and now the most stupid question of all, how do i use this php file ? :|

    1. Matthew Ruddy
      Matthew Ruddy April 13, 2013 at 17:34 | | Reply

      Include the file using PHP, then use the function as you would use any other function. Of course, you’ll need some PHP knowledge to do this.

  7. GhozyLab
    GhozyLab April 30, 2013 at 04:42 | | Reply

    Hi Matthew, Greate plugin!

    Can I use it for commercial wordpress plugins?

    1. Matthew Ruddy
      Matthew Ruddy April 30, 2013 at 13:10 | | Reply

      Sure, that’s no problem at all :)

Leave a Reply

Wordpress Cloud Hosting