Skip to main content

Img

info

For more details about Vuetify’s usage of Img component, click Img page.
For more prop explanations, click Vuetify Img API page.

Props

AttributeDescriptionTypeDefault
altAlternate text for screen readers.stringundefined
aspectRatioCalculated as width/height. Will be calculated automatically if omitted.string-numberundefined
classAllows custom properties to take effect.stringundefined
containPrevents the image from being cropped if it doesn’t fit.booleanundefined
darkApplies the dark theme variant to the component.booleanfalse
eagerWill force the components content to render on mounted.booleanfalse
lazySrcSomething to show while waiting for the main image to load, typically a small base64-encoded thumbnail. Use vuetify-loader to generate automatically.stringundefined
minHeightSets the minimum height for the component.string-numberundefined
minWidthSets the minimum width for the component.string-numberundefined
optionsOptions that are passed to the Intersection observer constructor.object{}
positionOverrides the default to change which parts get cropped off. Uses the same syntax as background-position.string'center center'
sizesDefine sizes of Snackbars.stringundefined
srcThe image URL. This prop is mandatory.string-objectundefined
srcsetA set of alternate images to use based on device size.stringundefined
transitionThe transition to use when switching from lazy-src to src.boolean-stringfade-transition
visibleVisibility of Img component.booleantrue

Example

image

image

Images.json

Samples Qjson

images