Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: Resizing images automatically after uploading them.  (Read 5195 times)

Offline 4thstar

  • Newbie
  • *
  • Posts: 31
  • Karma: +5/-0
    • View Profile
Resizing images automatically after uploading them.
« on: October 08, 2013, 11:34:01 AM »
Hello.
I mentioned this in a previous topic however thought i would mention this again in its own thread..
i have a couple of issues..maybe its me being picky but never the less here they are :)

A:I have noticed that the product page and the zoom feature for images works differently depending on how large the original image was when it was uploaded, i wanted to make it easy for clients to not be to concerned about resizing images before they are uploaded.

B:the uploaded images retain their original file size thus its easy to start to take up lots of space when its not needed..(i know smaller thumbnails are generated - but the original image seems still to be used for the zoom)

For the moment i have edited the product page to use an open source thumbnail creator for the zoomed image (which creates and caches an 800x600 thumbnail of the original photo..this speeds up the page loading greatly..

My Request Please...

After we use the image uploader and the image gets saved into the resources folder can anyone advise how to take this image the have it resized to say 800px max (width or height maintaining aspect ratio) and re-saved?

why have a 4mb 3000x3000px plus file when a 130k 800x600 file works just as well?

Many thanks
Carl

Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1599
  • Karma: +93/-1
    • View Profile
Re: Resizing images automatically after uploading them.
« Reply #1 on: October 08, 2013, 03:42:19 PM »
Why not upload correct size from the beginning?

You can use any image software on your computer to format, optimize and resize your images.

If really necessary, extension can be created to format uploaded images, but they way browsers work large image will be still uploaded first to the server before resizing.

Why do you want your bandwidth and server work for you instead of your computer? :)
 
“If you’re in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent.”
― Warren Buffett

Offline 4thstar

  • Newbie
  • *
  • Posts: 31
  • Karma: +5/-0
    • View Profile
Re: Resizing images automatically after uploading them.
« Reply #2 on: October 08, 2013, 04:24:53 PM »
Quote
Why not upload correct size from the beginning?
My current clients are not very computer literate...they will not be able to handle resizing images before upload... most will but this client wont without much trial and error.

Quote
You can use any image software on your computer to format, optimize and resize your images.
Thankyou, yes i have several, my clients do not :)

Quote
If really necessary, extension can be created to format uploaded images, but they way browsers work large image will be still uploaded first to the server before resizing.
Yes good to know..lol i dont know enough php to do this ? please advise on how i go about finding out more..

Quote
Why do you want your bandwidth and server work for you instead of your computer? :)
Unless i am seeing something different here, this is the biggest point i could make..
When i look at the source code for the product page it calls the original image when using the zoom feature..
4 images at 4mb each per product will make the server dish out 16mb for 1 page
i would sooner use a little server resources to process the image once after uploading than each time lose 16mb each time 1 page is viewed..

I have spent the day searching for jquery topics on resizing images, however i know little php and no jquery..
so gave up for the moment :)

Cheers
Carl


Online llegrand

  • Hero Member
  • *****
  • Posts: 1508
  • Karma: +396/-3
    • View Profile
Re: Resizing images automatically after uploading them.
« Reply #3 on: October 08, 2013, 05:05:35 PM »
Hi Carl,

I would have to agree with eCommerce about not using the server resources here.

I do understand having clients who aren't very computer savvy!   However you have indicated that you were going to work on a multi store environment -  so it would seem that you should be looking for a solution that makes all of the web visitors experiences as quick as possible.   That means using resources for the web visitors best results.  And in the multistore setup,  seems like you might be penalizing the users who do it correctly by managing their pics locally before uploading.

So why don't you try sharing something simple with your beginning customers - that won't be difficult and won't cost them any money.   Use something simple like http://www.picresize.com/ .   It's free,  online,  can use image on the PC or from a web address.  It's also very simple.   There are lots of other out there too.

Also,  don't forget DPI settings also affect the file size.  Currently  72 or 96 seems to work well on webpages.  And makes the files sizes smaller.  There are so many phone pics now,  they all seem to come thru a high DPI, 300 or more.  Great for high quality printing,  useless on the webpage.

I get iPhone photos from one of my clients -  they come in at 300 DPI and 2000 x 2000 sizes -  and about 600 KB,  if I resize to 500 wd pixels,  and 96 DPI  it is 76 KB and looks great on the webpage.  Loads quickly too.

Just my opinion here.

Just another Abantecart user.

Offline 4thstar

  • Newbie
  • *
  • Posts: 31
  • Karma: +5/-0
    • View Profile
Re: Resizing images automatically after uploading them.
« Reply #4 on: October 08, 2013, 05:34:51 PM »
Thankyou, your input is always most welcome and i appreceate your opinion :)

I have as suggested used sites like you have mentioned before, for me i would use pc based Photoshop, snagit or similar.
Yes of course i can put forward this to clients.

I am not using the multi cart system, i decided to use multiple installs. thus users will have full access to each admin area (functions limited by their group).

Again here i am still learning the way things work, but i am working off a dedicated server with medium specs, and i cant get my head around why having the posibility of several large sized photos using up lots of bandwidth isnt an issue on the products page, when an alternative would be to simply have the option to upload, then resize the image before its saved to the server..

Trust users to resize images themselves, they dont and this causes repeated long loading times on each page view, if they want to wait an extra 5 minutes each image waiting to upload so be it :)

Or

Do a one off resize to preset dimensions after upload and never have issues?

i read lots today about jquery and settings, looked at the files but couldnt get to grips with what did what and when :) i read one article suggesting it was possible to use the upload system and have the image resized client side?

then theres also the way in which images zoom and how much, they zoom in diferently depending on the dimensions of the original image uploaded.

Thinking about it, I know of two clients that will (Even if advised) will still upload large files when their supplier sends them to their dropbox...

If it is possible to use the already in place script but edit some settings like..

resize: true,
maxWidth: 800,
maxHeight: 800,

can some one in support take a look, its just not my area of knowhow ... but i learn every day :)

many thanks
Carl


Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 4463
  • Karma: +207/-0
    • View Profile
Re: Resizing images automatically after uploading them.
« Reply #5 on: October 09, 2013, 01:48:41 AM »
Hello.
Just for Your info there is several flash based solutions allows to resize image on client side (before upload!) and only after resize - script upload resized images to server side. try to search with google for example see link

But adobe flash player required on client side and to implement to your site good php/html skills required.
“Chuck Norris is so amazing.”
― Mother Teresa

Offline 4thstar

  • Newbie
  • *
  • Posts: 31
  • Karma: +5/-0
    • View Profile
Re: Resizing images automatically after uploading them.
« Reply #6 on: October 09, 2013, 09:27:01 AM »
Thankyou..
For the moment i will keep an eye on the folders and resize manually if needed, looks like i can sync image folders and automatically resize and re-upload images over a set size at a later date :)

Thanks for the advice..
Cheers
Carl

 

Powered by SMFPacks Social Login Mod