service.getURL() — astro Function Reference
Architecture documentation for the service.getURL() function in image-service.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 943f4152_8696_d4c2_6d4d_a39b7f0adf33["service.getURL()"] e047b00d_e2bb_b33f_0ef7_57adb682ce73["image-service.ts"] 943f4152_8696_d4c2_6d4d_a39b7f0adf33 -->|defined in| e047b00d_e2bb_b33f_0ef7_57adb682ce73 72a9c1b1_aaff_744e_3663_e18ad77dc598["removeLeadingForwardSlash()"] 943f4152_8696_d4c2_6d4d_a39b7f0adf33 -->|calls| 72a9c1b1_aaff_744e_3663_e18ad77dc598 style 943f4152_8696_d4c2_6d4d_a39b7f0adf33 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/integrations/netlify/src/image-service.ts lines 14–35
getURL(options) {
// For SVG files, return the original source path
if (isESMImportedImage(options.src) && options.src.format === 'svg') {
return options.src.src;
}
// For non-SVG files, continue with the Netlify's image processing
const query = new URLSearchParams();
const fileSrc = isESMImportedImage(options.src)
? removeLeadingForwardSlash(options.src.src)
: options.src;
query.set('url', fileSrc);
if (options.format) query.set('fm', options.format);
if (options.width) query.set('w', `${options.width}`);
if (options.height) query.set('h', `${options.height}`);
if (options.quality) query.set('q', `${options.quality}`);
return `/.netlify/images?${query}`;
},
Domain
Subdomains
Source
Frequently Asked Questions
What does service.getURL() do?
service.getURL() is a function in the astro codebase, defined in packages/integrations/netlify/src/image-service.ts.
Where is service.getURL() defined?
service.getURL() is defined in packages/integrations/netlify/src/image-service.ts at line 14.
What does service.getURL() call?
service.getURL() calls 1 function(s): removeLeadingForwardSlash.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free