Jump to content

Big image scroll issues


Manixat

Recommended Posts

Hey freaks,

 

I have this section of my site where users get to upload one big a** photo which causes a big issue when it is being displayed in a 256x256 img object. The photos vary from 1680x1050 up to 2560x1600. Is there any way I can display those photos as small thumbnails, without actually creating thumbnails, without having scroll-lag ?

Link to comment
https://forums.phpfreaks.com/topic/276983-big-image-scroll-issues/
Share on other sites

The only way I know about it is when you are putting in the picture, set up a CSS item there (Such as the following)

 

 

<div id="thumbnail"><img src="IMAGEURLHERE" alt="" /></div>

 

and the CSS for it would be like

 

#thumbnail IMG {
max-width: 250px;
max-height: 250px;
}

 

This is untested, but should work.

  On 4/16/2013 at 4:50 AM, DavidAM said:

This is because you are only resizing the display of the image. You are still downloading the full 20 MB photo (or whatever size it is). If you create an actual thumbnail, it is a much smaller image file and downloads much faster.

And as far as that goes, that can be done via PHP (I've done it before). I would have to look back through my old PHP projects to see if I still have the code for that (haven't done that in a while.)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.