diff --git a/src/queries/sql/heatmap/ensureHeatmapSnapshot.ts b/src/queries/sql/heatmap/ensureHeatmapSnapshot.ts index 86252ebf6..a194deb42 100644 --- a/src/queries/sql/heatmap/ensureHeatmapSnapshot.ts +++ b/src/queries/sql/heatmap/ensureHeatmapSnapshot.ts @@ -316,7 +316,10 @@ async function findClickhouseSnapshot( } function getSnapshotImageUrl(websiteId: string, snapshotId: string) { - return getApiUrl(`/websites/${websiteId}/heatmaps/snapshots/${snapshotId}`); + return getApiUrl(`/websites/${websiteId}/heatmaps/snapshots/${snapshotId}`, { + apiUrl: process.env.API_URL, + basePath: process.env.BASE_PATH, + }); } function mapSnapshot(websiteId: string, row: SnapshotRecord): HeatmapSnapshotImage {