Manixat Posted April 15, 2013 Share Posted April 15, 2013 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 ? Quote Link to comment https://forums.phpfreaks.com/topic/276983-big-image-scroll-issues/ Share on other sites More sharing options...
Minato Posted April 15, 2013 Share Posted April 15, 2013 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. Quote Link to comment https://forums.phpfreaks.com/topic/276983-big-image-scroll-issues/#findComment-1424945 Share on other sites More sharing options...
Manixat Posted April 15, 2013 Author Share Posted April 15, 2013 it is exactly what I've done and the page is scrolling fine until it gets to this little thumbnail where it scrolls in pictures ( not smoothly ) and after it's gone it continues to scroll like it's supposed to Quote Link to comment https://forums.phpfreaks.com/topic/276983-big-image-scroll-issues/#findComment-1424957 Share on other sites More sharing options...
DavidAM Posted April 16, 2013 Share Posted April 16, 2013 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. Quote Link to comment https://forums.phpfreaks.com/topic/276983-big-image-scroll-issues/#findComment-1425010 Share on other sites More sharing options...
Minato Posted April 16, 2013 Share Posted April 16, 2013 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.) Quote Link to comment https://forums.phpfreaks.com/topic/276983-big-image-scroll-issues/#findComment-1425176 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.