diff options
Diffstat (limited to 'packages/integrations/image/src/index.ts')
-rw-r--r-- | packages/integrations/image/src/index.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/integrations/image/src/index.ts b/packages/integrations/image/src/index.ts index 0a101724e..671faad5c 100644 --- a/packages/integrations/image/src/index.ts +++ b/packages/integrations/image/src/index.ts @@ -130,7 +130,11 @@ export default function integration(options: IntegrationOptions = {}): AstroInte // Doing this here makes sure that base is ignored when building // staticImages to /dist, but the rendered HTML will include the // base prefix for `src`. - return prependForwardSlash(joinPaths(_config.base, _buildConfig.assets, filename)); + if (_config.build.assetsPrefix) { + return joinPaths(_config.build.assetsPrefix, _buildConfig.assets, filename); + } else { + return prependForwardSlash(joinPaths(_config.base, _buildConfig.assets, filename)); + } } // Helpers for building static images should only be available for SSG |