Jump to content

Recommended Posts

Hi!

 

I have a website that will show some pictures along with reviews. Both reviews as pictures will be written & uploaded by the visitors of the website. Each review will have 1 or more pictures attached to it. At the moment, I'm just attaching the link to the image, and showing it to the user by using <img src="$link">.

 

However, this link is to the original picture (which can be quite big). To conserve bandwidth, I'd like to create thumbnails for each of these images. I've found some useful resizing algorithms, which i intend to run in batch using a chronjob.

 

Now, i'm facing a problem though:

How can i convert all these images at once to thumbnails, without having to download them to my PC and uploading them manually to my server? So basically, I'd like a script that will:

 

given a list of links to images, i'd like to loop through them, resize each of them, and upload them to a folder on my server.

 

Is this at all possible? And if so, can you give me some tips to get started? At the moment, i only see solutions that involve manual interaction (using <input type="file" ...>). That's not what i'd want to use...

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/53323-upload-images-to-server/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.