lochmueller / focuspoint

🌅 Smartest TYPO3 Crop Tool ever 🌅
http://typo3.org/extensions/repository/view/focuspoint
22 stars 23 forks source link

External storage support #70

Closed rvriel closed 5 years ago

rvriel commented 5 years ago

The displayableImageUrl method always prefixes the image url with the TYPO3_SITE_URL. If an external storage like Amazon S3 is used this won't work because the Amazons S3 url differs from the TYPO3 site url.

A solution could be to add a check in the displayableImageUrl method if the image url already is a valid url.

if(filter_var($url, FILTER_VALIDATE_URL)) {
    return $url;
}

return GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . \ltrim($url, '/');

I tried to create a branch to create a pull request, but I have no permission to do so.