natasha_thomas Posted May 21, 2011 Share Posted May 21, 2011 Folks, I have an Image URL, i want to show this image on my site but i want to resize the image on the fly. Image: http://ecx.images-amazon.com/images/I/41daynaberL._SL75_.jpg What i am doing is: <img height="100" width="80" src="http://ecx.images-amazon.com/images/I/41daynaberL._SL75_.jpg" /> But its not resizing the Image... Any solutions? Cheers N Quote Link to comment https://forums.phpfreaks.com/topic/237056-image-resizing/ Share on other sites More sharing options...
crmamx Posted May 22, 2011 Share Posted May 22, 2011 Why don't you resize it with a photo editor instead of the browser? Quote Link to comment https://forums.phpfreaks.com/topic/237056-image-resizing/#findComment-1218584 Share on other sites More sharing options...
arbitter Posted May 22, 2011 Share Posted May 22, 2011 I don't quite see the problem, no flaws in your code and it should do the trick. Are you sure it isn't resized? Quote Link to comment https://forums.phpfreaks.com/topic/237056-image-resizing/#findComment-1218795 Share on other sites More sharing options...
fishtoon Posted May 24, 2011 Share Posted May 24, 2011 Hi. You can useing CSS control the imgae resize, For example: .img { max-width:300px; /*width:300px;*/ width:expression(width>300?"300px":width+"px");max-width: 300px; overflow:hidden; } Quote Link to comment https://forums.phpfreaks.com/topic/237056-image-resizing/#findComment-1219370 Share on other sites More sharing options...
hemo-ali Posted May 25, 2011 Share Posted May 25, 2011 Yes css is another solution but why html doesn't work the html code above is correct Quote Link to comment https://forums.phpfreaks.com/topic/237056-image-resizing/#findComment-1220117 Share on other sites More sharing options...
crmamx Posted May 25, 2011 Share Posted May 25, 2011 Yes css is another solution but why html doesn't work the html code above is correct I don't know what your problem is but you are right, the code does work. But first, why are you linking to the image instead of downloading it? And secondly, the image is 75x50 px and you can't resize a picture larger without distorting it which is what happens in this case. Quote Link to comment https://forums.phpfreaks.com/topic/237056-image-resizing/#findComment-1220234 Share on other sites More sharing options...
spiderwell Posted May 28, 2011 Share Posted May 28, 2011 do you actually mean you want to create a thumbnail image of the original? Quote Link to comment https://forums.phpfreaks.com/topic/237056-image-resizing/#findComment-1221609 Share on other sites More sharing options...
ryanfilard Posted June 1, 2011 Share Posted June 1, 2011 Folks, I have an Image URL, i want to show this image on my site but i want to resize the image on the fly. Image: http://ecx.images-amazon.com/images/I/41daynaberL._SL75_.jpg What i am doing is: <img height="100" width="80" src="http://ecx.images-amazon.com/images/I/41daynaberL._SL75_.jpg" /> But its not resizing the Image... Any solutions? Cheers N Have img height="100" width="80" after the img src <src="http://ecx.images-amazon.com/images/I/41daynaberL._SL75_.jpg" img height="100" width="80" /> Quote Link to comment https://forums.phpfreaks.com/topic/237056-image-resizing/#findComment-1223267 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.