service.getURL() — astro Function Reference
Architecture documentation for the service.getURL() function in build-service.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 0197b90b_6b3b_d948_0d5d_73a240c844f3["service.getURL()"] 50d6c5a0_3bd9_55ef_d9d2_9d25a375dbf7["build-service.ts"] 0197b90b_6b3b_d948_0d5d_73a240c844f3 -->|defined in| 50d6c5a0_3bd9_55ef_d9d2_9d25a375dbf7 389dbd7f_e42b_a630_d8cb_237b4b961087["removeLeadingForwardSlash()"] 0197b90b_6b3b_d948_0d5d_73a240c844f3 -->|calls| 389dbd7f_e42b_a630_d8cb_237b4b961087 style 0197b90b_6b3b_d948_0d5d_73a240c844f3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/integrations/vercel/src/image/build-service.ts lines 46–64
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 Vercel image processing
const fileSrc = isESMImportedImage(options.src)
? removeLeadingForwardSlash(options.src.src)
: options.src;
const searchParams = new URLSearchParams();
searchParams.append('url', fileSrc);
options.width && searchParams.append('w', options.width.toString());
options.quality && searchParams.append('q', options.quality.toString());
return '/_vercel/image?' + searchParams;
},
Domain
Subdomains
Source
Frequently Asked Questions
What does service.getURL() do?
service.getURL() is a function in the astro codebase, defined in packages/integrations/vercel/src/image/build-service.ts.
Where is service.getURL() defined?
service.getURL() is defined in packages/integrations/vercel/src/image/build-service.ts at line 46.
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