Home / Function/ baseService.getHTMLAttributes() — astro Function Reference

baseService.getHTMLAttributes() — astro Function Reference

Architecture documentation for the baseService.getHTMLAttributes() function in service.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  1cf9a504_a136_9deb_7e14_254892825464["baseService.getHTMLAttributes()"]
  f0f55fc4_9c63_b35c_86d8_8eb3e4fa20ee["service.ts"]
  1cf9a504_a136_9deb_7e14_254892825464 -->|defined in| f0f55fc4_9c63_b35c_86d8_8eb3e4fa20ee
  0f9d5a56_bd2b_84fb_9878_5bcb5fd97446["getTargetDimensions()"]
  1cf9a504_a136_9deb_7e14_254892825464 -->|calls| 0f9d5a56_bd2b_84fb_9878_5bcb5fd97446
  style 1cf9a504_a136_9deb_7e14_254892825464 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/assets/services/service.ts lines 251–276

	getHTMLAttributes(options) {
		const { targetWidth, targetHeight } = getTargetDimensions(options);
		const {
			src,
			width,
			height,
			format,
			quality,
			densities,
			widths,
			formats,
			layout,
			priority,
			fit,
			position,
			background,
			...attributes
		} = options;
		return {
			...attributes,
			width: targetWidth,
			height: targetHeight,
			loading: attributes.loading ?? 'lazy',
			decoding: attributes.decoding ?? 'async',
		};
	},

Domain

Subdomains

Frequently Asked Questions

What does baseService.getHTMLAttributes() do?
baseService.getHTMLAttributes() is a function in the astro codebase, defined in packages/astro/src/assets/services/service.ts.
Where is baseService.getHTMLAttributes() defined?
baseService.getHTMLAttributes() is defined in packages/astro/src/assets/services/service.ts at line 251.
What does baseService.getHTMLAttributes() call?
baseService.getHTMLAttributes() calls 1 function(s): getTargetDimensions.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free