Home / Function/ shouldOptimizeImage() — astro Function Reference

shouldOptimizeImage() — astro Function Reference

Architecture documentation for the shouldOptimizeImage() function in content-entry-type.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  7f1744fb_a6a1_15cf_8327_df1c73786267["shouldOptimizeImage()"]
  b46411b3_6535_0116_92ac_cd60b744df11["content-entry-type.ts"]
  7f1744fb_a6a1_15cf_8327_df1c73786267 -->|defined in| b46411b3_6535_0116_92ac_cd60b744df11
  c2c7a61c_9a8b_d227_0cd0_3736afcea46d["emitOptimizedImages()"]
  c2c7a61c_9a8b_d227_0cd0_3736afcea46d -->|calls| 7f1744fb_a6a1_15cf_8327_df1c73786267
  style 7f1744fb_a6a1_15cf_8327_df1c73786267 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/integrations/markdoc/src/content-entry-type.ts lines 353–356

function shouldOptimizeImage(src: string) {
	// Optimize anything that is NOT external or an absolute path to `public/`
	return !isValidUrl(src) && !src.startsWith('/');
}

Domain

Subdomains

Frequently Asked Questions

What does shouldOptimizeImage() do?
shouldOptimizeImage() is a function in the astro codebase, defined in packages/integrations/markdoc/src/content-entry-type.ts.
Where is shouldOptimizeImage() defined?
shouldOptimizeImage() is defined in packages/integrations/markdoc/src/content-entry-type.ts at line 353.
What calls shouldOptimizeImage()?
shouldOptimizeImage() is called by 1 function(s): emitOptimizedImages.

Analyze Your Own Codebase

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

Try Supermodel Free