Bootstrap has an img
class that allows users to set various properties for images and display them responsively. The class enables images to be scaled according to the screen size while making sure the images do not exceed the size of the parent class.
The image class has various available properties, some of which are demonstrated below:
Adding the .img-responsive
class to the image enables images to be responsive and allows them to scale with the parent element.
We can also add thumbnails to our image using the .img-thumbnail
. This thumbnail will give the image a rounded 1px border appearance:
The .img-circle
class encloses the image inside a circle: