Reputation: 621
I have an application that takes an unknown image via submission by the user, and places onto the website. The image is a direct link to another image.
<img src="someimagesite.com/adasd.jpg" width="500px">
I am looking for a way such that, if an image is submitted that is less that 500px, it scales the image to its original size instead of enlarging the image to 500px. If the image is larger than 500px, it keeps it at 500px instead of enlarging it the orignal size. The solution can either be in javascript or html. I would appreciate any help on the issue. Thanks.
Upvotes: 0
Views: 116