use webp instead of png for skills

This commit is contained in:
Jonas Leder 2022-04-16 23:36:25 +02:00
parent 8c5b68037a
commit 9abcba556c
No known key found for this signature in database
GPG key ID: CC3C488E27DFF5CA

View file

@ -29,7 +29,7 @@ function getSkills() {
// Get the actual presigned-url
$downloadURL = (string) $presignedRequest->getUri();
$encodedUrl = rtrim(strtr(base64_encode($downloadURL), '+/', '-_'), '=');
$path = "/rs:fit:0:80:1/g:no/{$encodedUrl}.png";
$path = "/rs:fit:0:80:1/g:no/{$encodedUrl}.webp";
$signature = rtrim(strtr(base64_encode(hash_hmac('sha256', $imgProxySalt.$path, $imgProxyKey, true)), '+/', '-_'), '=');
array_push($response, $imgProxyUrl . "/" . $signature . $path);