Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8627779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:22:01+00:00 2026-06-12T08:22:01+00:00

Hi I want to save an uploaded image as 2 versions (normal and thumbnail)

  • 0

Hi I want to save an uploaded image as 2 versions (normal and thumbnail)

Here is the code I’m using for normal:

$picture = Upload::save($_FILES['picture']);
// Resize, sharpen, and save the image
Image::factory($picture)->resize(200, NULL)->save();
$profile->profile_picture = basename($picture);

This works, but I also want to create a smaller version to $profile->profile_picture_thumb.

I have tried just repeating the above process with a a different variable name $picture_thumb = Upload::save($_FILES['picture']);. But that that did not work me.

Any suggestions would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T08:22:02+00:00Added an answer on June 12, 2026 at 8:22 am

    Upload::save() returns path to saved file, so just easily create new Image instance from it and save smaller version of Image. Something like:

    $picture = Upload::save($_FILES['picture']);
    // Resize, sharpen, and save the image
    $image = Image::factory($picture)->resize(200, NULL);
    $image->save();
    $profile->profile_picture = basename($picture);
    
    
    
    // Save thumbnail
    $thumb_path = dirname($image->file).'/thumb_'.basename($image->file);
    Image::factory($picture)->resize(100, NULL)->save($thumb_path); 
    $profile->profile_picture_thumb = basename($thumb_path);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to extract first frame of uploaded video and save it as image
I want to save the image which as been uploaded via the PaletteGenForm as
I have a php file that creates a thumbnail using an uploaded image. If
I'm using ImageMagick to get 3 versions of an uploaded picture. The problem is
I want to upload the image using the .NET webservices and that will be
I have this code: http://jsfiddle.net/J6vzU/1/ I want to dynamically display thumbnail of uploaded file
I want to resize uploaded images to a small version and thumbnail version. Therefore
I want to save uploaded files such as a user's avatar image to user
i want to upload an image file to server, and i've uploaded successfully to
I want to save and load my xml data using XmlReader. But I don't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.