Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Custom Image Re-Sizing

edited July 2005 in Vanilla 1.0 Help
Hello (mark specifically), I have a few suggestions/ requests for filebrowser. Before I start, I would like to make it clear that I understand the filebrowser is supposed to be simple and easy to use. Extra fetures, only complicate things... but, What I am bout to request is for a one off case. (enough blabber, on with the show) Additon to thumbnailer.php that allows the user to designate MULTIPLE re-size dimensions. In just the same way it creates a thumbnail from a larger image, it would generate a few different sizes at the same time. (1024x768, 1600x1200, 1680x1050). The NEW sizes would then be presented under the title of the image (in a smaller font or something). I have a few more details, but I would like your feedback/ ideas first.


  • One way to tackle that would be to use a dynamic resizing script and feed it filename and dimensions to output. Honestly though I don't know how feasable that would be for larger images as recreating every image from scratch every time could be somewhat taxing on the server. but as long as they were only accessed occasionally, it could work just fine. I personally use a resizing script for dynamically displaying thumbnails of images in a flash based image viewer I'm working on. The quality is decent (not photoshop, but not bad either), and it doesn't seem to slow anything down when thumbnailing several images in a row. Here's a beta version of the imageviewer using the resize script for the thumbs:
  • edited July 2005
    There is already a resize script in the thumbnailer.php file. (that is what it does :-P ), I just want to know how to extend this, so that the user can define a few new sizes to scale to. It performs batch processing (I think 32 or 22 at a time), so it would simple add the NEW sizes to the queue. Mark, in know you are busy, but I would appreciate your input. Cheers, Nathan
  • edited July 2005
    no, I don't think you understand what I was saying.

    I'm talking about dynamically resizing and displaying/outputting an image, not using a script to resize a file and save it on the server for later viewing.
    this image:

    can automatically be resized on the fly using a script:

    meaning, all you need to do is write an extension that will add links below the image that would open the image through the resizing script at the specified dimensions. The example is set to make the largest dimension 100 pixels.
  • Oh.... I understand now, but that is not what i want. I want it to do the resizing first, when it generates the thumbnail. It only needs to be done once, so having it generate dynamically is just not practical with regards to server resources. If it does it once, the task is done. No more server activity, until THAT specific file is called, and then it is a simple page load, no extra work. i need to script to generate a few different sizes and then leave the files alone. (unless I tell it to do it all again)
  • does that clear things up, or are we still on a different page?
  • edited July 2005
    I understood what you wanted from the beginning, I was just offering an alternative solution. For smaller audiences I think it would be a good solution, but I dont know how much traffic you'd be dealing with, so I wont try to assume that my solution would work for you. :)
  • Your solution is fine, but as you JUSt menttioned, it would be a high traffic site. I have the hd space to hold all the resized images, but I think dynamically resizing the on request could give my server a good kick in the pants. Great solution, but just not the one for this problem (unfortunately).
  • *new strategy: email mark directly*
  • I'd probably go with being patient instead. I doubt he hasn't seen this, he's likely preoccupied with something else.
  • I had a few other things to talk about with him as well, and seeing as though whispers have been turned off here, I think an email is probably best (for the other stuff I had to say). I did point him in this direction, but raised no more points in the email. I understand he has job, and (shock) a life. I don't mean to pester him. Thanks for your contribution.
This discussion has been closed.