# \[PHP\] Resizing a pic for a gallery

**URL:** <https://forum.kirupa.com/t/php-resizing-a-pic-for-a-gallery/169494>\
**Category:** programming\
**Created:** [November 16, 2005, 6:14pm UTC](https://forum.kirupa.com/t/php-resizing-a-pic-for-a-gallery/169494 "2005-11-16T18:14:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![booler](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@booler](https://forum.kirupa.com/u/booler)\
**Post date:** [November 16, 2005, 6:14pm UTC](https://forum.kirupa.com/t/php-resizing-a-pic-for-a-gallery/169494/1 "2005-11-16T18:14:02Z")

</div>

I’m trying to setup a system where I can just drop in the photos to a directory and use PHP to resize the pics for a thumbnail and a smaller view version…

In a nut shell I want to drop a file in a directory run the script and it will create a thumbnail 30x30px a “smaller” version 300x300px and leave the source, I would like to either rename the thumb and smaller version OR create them in a seperate directory.

I would drop the original in /galleryname/  
and the script can rename them or put them in a /galleryname/thumbnail/  
and the smaller version into /galleryname/small/

is this possible either way would be fine if I could rename the thumbs and small something like (original)1.jpg 1-thmb.jpg and 1-small.jpg

if you guys can point me in the right direction I would appreiciate it, I’m planning on using this with a flash gallery so I don’t need a display script… I’m just looking for some direction to get me started coding this if its even possible thanks in advance everyone…
