I’m very very new on HTML and CSS development.
I have a HTML page with an img tag. This tag will hold some images. These images has different sizes. I set up a width and height to img tag using CSS.
All images will be shown using JavaScript.
May I need to resize images with JavaScript before I assign an image to IMG tag?
Maybe, I don’t need to do that because I set up IMG size using CSS. Proportions will be constrained?
Sorry for my English.
The aspect ratio wont be maintained if you have set both the height and width using css. But if you specify any one of the properties using the html
imgtag then the aspect ratio would be maintained.