Adding Photos To Website

JackT06

macrumors 6502
Original poster
Jul 24, 2009
293
0
I am currently setting up my own photo website. Of course one thing which im going to need is to be able to put photos what i plan on doing is making little thumbnails but how do i do this at the moment i use this code
Code:
<a href="http://i457.photobucket.com/albums/qq292/JackT06/nz431722.jpg" target="_blank">
<img src="http://i457.photobucket.com/albums/qq292/JackT06/nz431722.jpg" width="100" height="131" border="0" alt="Photo of a big bunny rabbit!" />
</a>
But the problem is that when i put that code onto my website the little thumbnail doesnt look right because of the pixels. Can anyone recommend a better way?
 

NathanCH

macrumors 65816
Oct 5, 2007
1,053
0
Stockholm, Sweden
The code looks right. What do you mean "because of the pixels"? I'm guessing the problem is that resizing a large image via code is causing it to not only load slowly, but look bad too.

What you should do is resize each image in photoshop first. Or you can use Automator and do a bunch of images at once.

There is PHP code that can create thumbnails for you and auto post. But I think it may be too complex at this stage.
 

JackT06

macrumors 6502
Original poster
Jul 24, 2009
293
0
The code looks right. What do you mean "because of the pixels"? I'm guessing the problem is that resizing a large image via code is causing it to not only load slowly, but look bad too.

What you should do is resize each image in photoshop first. Or you can use Automator and do a bunch of images at once.

There is PHP code that can create thumbnails for you and auto post. But I think it may be too complex at this stage.
Ye its loading slow and also looking bad because all the pixels have been squashed together.

Ye i will try and use Automator to resize a few and see what the output is.

Ye im not to familiar with PHP
 

Consultant

macrumors G5
Jun 27, 2007
13,293
15
Remove height and width code if that produces an image that is not the right ratio.

Also, you want to host the images on your own server. Photobucket will remove the images if too many hits / hot link.
 

JackT06

macrumors 6502
Original poster
Jul 24, 2009
293
0
Remove height and width code if that produces an image that is not the right ratio.

Also, you want to host the images on your own server. Photobucket will remove the images if too many hits / hot link.
Ye i put the images through atomater and then removed the height and width and its fine now thanks :D.

Oh right, thanks for telling me i didnt know that. Gota find somewhere to host my site now :D
 

SrWebDeveloper

macrumors 68000
Dec 7, 2007
1,872
2
Alexandria, VA, USA
Just thought I'd throw this in for good measure...

If you find a webhost supporting PHP and GD graphics library, you can automate thumbnail creation by following the advice on this page:

http://www.phptoys.com/e107_plugins/content/content.php?content.46

It includes instructions on GD, the PHP commands to the resize, and most importantly the proper formula to resize and maintain the aspect ratio of the image at the same time. For example, upload one or more images and process each image with a script that automatically creates the thumbnails for you as well as the gallery.

FYI

-jim
 

Similar threads

Replies
1
Views
276
  • eRondeau
0
Replies
0
Views
983
  • jasondao
4
Replies
4
Views
1K
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.