Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Kündig committed Sep 3, 2018
2 parents 6739cb2 + d5dec50 commit 0c0014f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
17 changes: 6 additions & 11 deletions classes/ResponsiveImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,16 +247,11 @@ protected function getUnavailableSizes()
*/
protected function normalizeImagePath($imagePath)
{
// If a relative path gets processed make sure to remove
// any subdirectory from the URL.
if(substr($imagePath, 0, 4) !== 'http') {
$base = $this->getBase();
$subdir = trim(str_replace($base, '', env('APP_URL')), '/') . '/';
return base_path(str_replace($subdir, '', $imagePath));
} else {
$imagePath = trim(str_replace(config('app.url'), '', $imagePath), '/');
return base_path($imagePath);
}
$base = $this->getBase();

$imagePath = trim(str_replace($base, '', $imagePath), '/');

return base_path($imagePath);
}

/**
Expand Down Expand Up @@ -306,4 +301,4 @@ protected function getPathHash()
{
return md5($this->path);
}
}
}
1 change: 1 addition & 0 deletions updates/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
1.1.5: Reverted multi-byte optimization since the change removes the DOCTYPE while parsing the html
1.1.6: Use correct app url to determine if an image is external or local
1.1.7: Optimized support for multi-byte character strings (thanks to sergei3456)
1.1.8: Optimized support for installations that serve multiple domains

0 comments on commit 0c0014f

Please sign in to comment.