Resize Image With Jquery January 28, 2024 Post a Comment The scenario: I’m building a website, which will not Host the images in its own server. Instead it will reference images from other servers. Example: The website is hosted at wwwSolution 1: you can easily do it by maintaining the aspect ratio.define max width and max height.by maintaining aspect ratio resize them.if ((h / w) < (maxH / maxW)) { $img.css('height', ''); $mg.css('width', maxW); } else { $Img.css('height', maxH); $Img.css('width', ''); Copy Share Post a Comment for "Resize Image With Jquery"
Post a Comment for "Resize Image With Jquery"