Closed kerrig closed 4 months ago
So at the time, the various social media sites did not allow for webp
images, but rather just image/jpeg
, image/gif
or image/png
It looks like since then, Facebook and Twitter have added support for image/webp
so I think he best solution is to add that to the allowed types.
Craft CMS 3:
You can try it now by setting your semver in your composer.json
to look like this:
"nystudio107/craft-seomatic": "dev-develop as 3.4.70”,
Then do a composer clear-cache && composer update
…..
Craft CMS 4:
You can try it now by setting your semver in your composer.json
to look like this:
"nystudio107/craft-seomatic": "dev-develop-v4 as 4.0.39”,
Then do a composer clear-cache && composer update
…..
Craft CMS 5:
You can try it now by setting your semver in your composer.json
to look like this:
"nystudio107/craft-seomatic": "dev-develop-v5 as 5.0.0-beta.3”,
Then do a composer clear-cache && composer update
@khalwat Tested and confirmed it's working! Thanks for the quick turnaround
Site is using seomatic.helper.socialTransform with an image from a field in the CMS. The image is a webp and the code is not calling a specific transform which is causing the template to throw an error:
The two main issues are because:
This is the code thats calling socialTransform:
{% do seomatic.meta.seoImage(seomatic.helper.socialTransform(seoImage)) %}
Here's the code that's failing (in src/helpers/ImageTransform.php):
Here's what I did to get it to work:
Once I added the check that transform isn't null, it worked without issue and the SEO Image gets properly set with the webp image.
Versions