VueFlux
Home
  • v5
  • v6
  • v7
Demos
GitHub
Home
  • v5
  • v6
  • v7
Demos
GitHub
  • Overview
  • Changelog
  • Installation and usage
  • Options VS Composition
  • SSR with Nuxt
  • Resources
    • Img
    • Video
    • Component
  • Components
    • VueFlux
    • FluxButton
    • FluxCube
    • FluxGrid
    • FluxImage
    • FluxParallax
    • FluxTransition
    • FluxVortex
    • FluxWrapper
  • Complements
    • FluxCaption
    • FluxControls
    • FluxIndex
    • FluxPagination
    • FluxPreloader
  • Transitions
    • Blinds 2D
    • Blinds 3D
    • Blocks 1
    • Blocks 2
    • Book
    • Camera
    • Concentric
    • Cube
    • Explode
    • Fade
    • Fall
    • Kenburn
    • Round 1
    • Round 2
    • Slide
    • Swipe
    • Warp
    • Waterfall
    • Wave
    • Zip
  • Custom transitions

Img

Renders an image

Constructor

constructor(
	src: string,
	caption: string = '',
	resizeType: ResizeType = 'fill',
	// Background color is only useful when the resizeType is fit,
	// so it fills the gaps of VueFlux size, and does not look odd when a transitions runs
	backgroundColor: null | string = null
)

Methods

// Called to load the resource returning a promise
load(): Promise<void>

// Called when the resource is loaded successfully
onLoad(img: HTMLImageElement, resolve: Function): void

// Called when an error occurs when loading the resource
onError(reject: Function): void
Last Updated: 12/8/25, 7:54 AM
Prev
Resources
Next
Video