Skip to content
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

Sitemap using large source images - is it possible use a transform or similar #1407

Closed
ChrisAtRyze opened this issue Jan 23, 2024 · 12 comments
Closed
Labels

Comments

@ChrisAtRyze
Copy link

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

@khalwat
Copy link
Collaborator

khalwat commented Jan 23, 2024

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?

@khalwat khalwat closed this as completed Jan 23, 2024
@khalwat
Copy link
Collaborator

khalwat commented Jan 25, 2024

Let me know if you want such an event added @ChrisAtRyze

@ChrisAtRyze
Copy link
Author

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

@khalwat
Copy link
Collaborator

khalwat commented Jan 26, 2024

Okay no worries. It wouldn't difficult to add, and on your end should be pretty easy to implement.

@ChrisAtRyze
Copy link
Author

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!

@ChrisAtRyze
Copy link
Author

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!

@khalwat
Copy link
Collaborator

khalwat commented Feb 21, 2024

Roger that, will re-open it and get the event added

@khalwat khalwat reopened this Feb 21, 2024
@ChrisAtRyze
Copy link
Author

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

@khalwat
Copy link
Collaborator

khalwat commented Apr 5, 2024

I should be able to get it in the next release.

@ChrisAtRyze
Copy link
Author

@khalwat brilliant, thank you! Do you have an idea of when that might be so I can let them know?

khalwat added a commit that referenced this issue Apr 7, 2024
khalwat added a commit that referenced this issue Apr 7, 2024
khalwat added a commit that referenced this issue Apr 7, 2024
@khalwat
Copy link
Collaborator

khalwat commented Apr 7, 2024

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

@khalwat khalwat closed this as completed Apr 7, 2024
@ChrisAtRyze
Copy link
Author

Awesome, thanks! I'll give it a go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants