I want to create a gallery of pictures for my website and upload those pictures from the administration panel of the website. I am going to show all pictures in a page with a very small size, and one place I will separate for each picture to show the selected picture (from small ones) with big size.
I know two ways of doing that:
I create 2 pictures for uploading from administration panel, one big and one small with a fixed size. So the big one I will load in the separate big space. And small will be shown in the small places. So the administrator of the site should CREATE 2 pics.
The second way I know is to use the GD library of PHP to be able to upload only the big picture, and in each place a PHP function will resize the big picture and get the 2 sizes that I need for the gallery.
The first method's disadvantage is, that the user of the site should use Photoshop or some other tool before uploading. Let’s agree that this is not a pleasant thing for the site user.
The second approach is not good either, as GD resizes the picture by lowering quality. And that loss is inadmissible because it is too much.
What is a way that does that resize operation while maintaining close to the original picture quality?
Or what is another approach that is better that these two?