In my website, I have a library contain all image of user, I want to display all image in this library. How can I do it?
I have solution but I can’t do it. This’s my solution. I’ll create thumbnail for each image and display it in library. Size of thumbnail is very small, so I don’t worry about performance. If I create thumbnail in my server. It must download, read and resize
these images, then it return for my website. This way I feel not good. I have many images, each customer have about hundreds images, size of each image about 1mb or 2mb. I think have no server can handle it. Another way is create thumbnail on
client by jQuery, but I can’t do it and my friend talk with me. jQuery don’t handle it. How can I do it for my solution? Hope you understand what I mean
my purpose create thubmnail is reduce size of image. Example: image have size 1mb, after use thumbnail, it have 10kb. These plugin you give me, It doesn't reduce size of image
If the image is already on the server, then using jQuery to resize the image is not going to help performance. Since jQuery is on the client, the full-size image would still be sent to the client before being resized.
As ignatandrei said, you should generate the thumbnail on your server and save it to file. Then, when serving the image, if the thumbnail already exists, use the existing thumbnail instead of generating a new one on the fly
Trung Truc
0 Points
26 Posts
Solution for display image in library
Jan 25, 2013 03:50 AM|LINK
In my website, I have a library contain all image of user, I want to display all image in this library. How can I do it?
I have solution but I can’t do it. This’s my solution. I’ll create thumbnail for each image and display it in library. Size of thumbnail is very small, so I don’t worry about performance. If I create thumbnail in my server. It must download, read and resize these images, then it return for my website. This way I feel not good. I have many images, each customer have about hundreds images, size of each image about 1mb or 2mb. I think have no server can handle it. Another way is create thumbnail on client by jQuery, but I can’t do it and my friend talk with me. jQuery don’t handle it. How can I do it for my solution? Hope you understand what I mean
ignatandrei
All-Star
134929 Points
21622 Posts
Moderator
MVP
Re: Solution for display image in library
Jan 25, 2013 04:00 AM|LINK
If the thumbnail on disk does not exists
{
create the thumbnail
store on disk
}
return thumbnail on disk
brijeshvaidy...
Participant
848 Points
231 Posts
Re: Solution for display image in library
Jan 25, 2013 05:09 AM|LINK
http://jasonlau.biz/home/jquery/screw-a-jquery-plugin
https://github.com/jasonlau/jQuery-Screw
Brijesh Vaidya
India
Trung Truc
0 Points
26 Posts
Re: Solution for display image in library
Jan 25, 2013 06:20 AM|LINK
Can I use client language(jQuey, JS,...) to create thumbnail base on url image?
brijeshvaidy...
Participant
848 Points
231 Posts
Re: Solution for display image in library
Jan 25, 2013 07:14 AM|LINK
http://joanpiedra.com/jquery/thumbs/
Brijesh Vaidya
India
Trung Truc
0 Points
26 Posts
Re: Solution for display image in library
Jan 25, 2013 08:38 AM|LINK
my purpose create thubmnail is reduce size of image. Example: image have size 1mb, after use thumbnail, it have 10kb. These plugin you give me, It doesn't reduce size of image
brijeshvaidy...
Participant
848 Points
231 Posts
Re: Solution for display image in library
Jan 25, 2013 09:52 AM|LINK
http://stackoverflow.com/questions/684092/create-thumbnail-and-reduce-image-size
Brijesh Vaidya
India
mgasparel
Member
298 Points
65 Posts
Re: Solution for display image in library
Jan 25, 2013 06:32 PM|LINK
If the image is already on the server, then using jQuery to resize the image is not going to help performance. Since jQuery is on the client, the full-size image would still be sent to the client before being resized.
As ignatandrei said, you should generate the thumbnail on your server and save it to file. Then, when serving the image, if the thumbnail already exists, use the existing thumbnail instead of generating a new one on the fly