Closed ChrisAtRyze closed 5 months ago
There is no facility for doing this, unfortunately. SEOmatic only automatically knows about the Assets you've added to an entry.
It would be possible for SEOmatic to throw an event that you could listen for via a custom module or plugin, and provide the transformed image to use, if that would be useful to you, though?
Let me know if you want such an event added @ChrisAtRyze
Hi @khalwat thanks for the quick response and apologies for not replying sooner. It would definitely be helpful however I'm just waiting on the go-ahead before implementing something custom. I'll let you know asap
Okay no worries. It wouldn't difficult to add, and on your end should be pretty easy to implement.
Hi @khalwat ok, cool. I've been given the go-ahead so I can implement it when you're able to add the event. Thanks for your help!
Hi @khalwat, if you're still cool to add this event, it'd be great to know when you think it'll be added in.
Thanks!
Roger that, will re-open it and get the event added
Hi @khalwat
Sorry to bother you, but when do you think you'll be able to implement this change so their audit can be satisfied as I'm being chased about it?
Cheers
I should be able to get it in the next release.
@khalwat brilliant, thank you! Do you have an idea of when that might be so I can let them know?
Added in the above commits. I decided to make it even easier: you just need to create an Image Transform and choose it in the new Sitemap Asset Transform setting in SEOmatic -> Content SEO -> (section) -> Sitemap settings
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.75”,
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.46”,
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”,
Then do a composer clear-cache && composer update
Awesome, thanks! I'll give it a go
One of our sites has had an SEO audit and they've pointed out the large images being listed in the sitemap that SEOmatic has automatically taken from the entries. This is because they're source images taken straight from the asset field. Is it possible to edit the functionality to specify a transform to list out smaller versions of these images? We can of course reduce the source image sizes manually but this would potentially risk the quality of the images on the site.
Thanks