We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.htaccess
RewriteEngine On # Redirect images to webp-on-demand.php (if browser supports webp) RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^(.*)\.(jpe?g|png)$ webp-on-demand.php?source=%{SCRIPT_FILENAME} [NC,L]
webp-on-demand.php
echo $source = $_GET['source'];
File Name:
B Tours & Travel Front Ad.jpg
URL:
https://www.example.com/storage/upload_assets/B%20Tours%20%26%20Travel%20Front%20Ad.jpg https://www.example.com/storage/upload_assets/B%20Tours%20&%20Travel%20Front%20Ad.jpg
Error:
/home/visionph/example.com/public/storage/upload_assets/B Tours Fatal error: Uncaught WebPConvert\Exceptions\InvalidInput\TargetNotFoundException: source file was not found in /home/visionph/example.com/vendor/rosell-dk/webp-convert/src/Helpers/PathChecker.php:71 Stack trace: #0 /home/visionph/example.com/vendor/rosell-dk/webp-convert/src/Helpers/PathChecker.php(85): WebPConvert\Helpers\PathChecker::checkAbsolutePathAndExists('/home/visionph/...', 'source') #1 /home/visionph/example.com/vendor/rosell-dk/webp-convert/src/Helpers/InputValidator.php(47): WebPConvert\Helpers\PathChecker::checkSourcePath('/home/visionph/...') #2 /home/visionph/example.com/vendor/rosell-dk/webp-convert/src/Helpers/InputValidator.php(58): WebPConvert\Helpers\InputValidator::checkSource('/home/visionph/...') #3 /home/visionph/example.com/vendor/rosell-dk/webp-convert/src/Serve/ServeConvertedWebP.php(135): WebPConvert\Helpers\InputValidator::checkSourceAndDestination('/home/visionph/...', '/home/visionph/...') #4 /home/visionph/example.com/vendor/rosell-dk/ in /home/visionph/example.com/vendor/rosell-dk/webp-convert/src/Helpers/PathChecker.php on line 71
The text was updated successfully, but these errors were encountered:
No branches or pull requests
.htaccess
webp-on-demand.php
File Name:
URL:
Error:
The text was updated successfully, but these errors were encountered: