Skip to content

Commit 266e411

Browse files
author
Bradie Tilley
committed
Fix - Generate absolute URLs instead of domain-relative URLs
1 parent 42a5f95 commit 266e411

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

classes/Resizer.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,10 @@ private function getRelativePath(): string
375375
*/
376376
public function getFirstTimeUrl(): string
377377
{
378-
return '/imageresize/' . $this->hash . '.' . $this->outputExtension();
378+
$url = '/imageresize/' . $this->hash . '.' . $this->outputExtension();
379+
$url = url($url);
380+
381+
return $url;
379382
}
380383

381384
/**
@@ -387,7 +390,10 @@ public function getFirstTimeUrl(): string
387390
*/
388391
public function getCacheUrl(): string
389392
{
390-
return '/' . $this->getRelativePath();
393+
$url = '/' . $this->getRelativePath();
394+
$url = url($url);
395+
396+
return $url;
391397
}
392398

393399
/**

updates/version.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,6 @@
2828
- Fix double slash issue in resized image URLs
2929
2.1.2:
3030
- Clear old images (for the v2.1.0 directory change)
31-
- clear_old_cache_dir.php
31+
- clear_old_cache_dir.php
32+
2.1.3:
33+
- Fix - Generate absolute URLs instead of domain-relative URLs

0 commit comments

Comments
 (0)