-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
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
image URL is double encoded #23
Comments
Hm I have set up the filename as you suggested but it seems to work fine for me: <meta property="og:image" content="http://tmp:8888/files/test/FALTER_Scheck%C3%BCbergabe%202018%20%28c%29%20Karin%20Wasner.jpg"> Can you find out which module includes this image (core, news, etc.) ? |
It's from a news list (image of the first news in the list on that page). |
I am still unable to reproduce that on MacOS 🙈 can you find out the fix for yourself? Is the image size calculated correctly? If it's double encoded then it should not work either... |
Yeah, I'll debug :) |
Ah, you need to set an image size in the page layout for the social images. |
I'd propose the following: // Resize the image
if ($resize[0] || $resize[1] || $resize[2]) {
- $strImage = \Image::get($strImage, $resize[0], $resize[1], $resize[2]);
+ $strImage = urldecode(\Image::get($strImage, $resize[0], $resize[1], $resize[2]));
- list($width, $height) = getimagesize(TL_ROOT . '/' . urldecode($strImage));
+ list($width, $height) = getimagesize(TL_ROOT . '/' . $strImage);
} |
I was about to write exactly the same. Thanks, I will fix this soon! |
3.5.3 is released now. |
If the path to the social image is
for example, the resulting
og:image
URL will bei.e. the URL is double encoded. The correct URL would be
Tested in Contao 4.4.13 with Social Images 3.5.2.
The text was updated successfully, but these errors were encountered: