It would depend on your version of Umbraco to be honest, but no that isn't going to cover all of your scenarios.
You have to consider content such as "Grid", "Nested Content" and RTE's as well as each of these add a deeper level of complexity. Not to mention any custom data types as well.
In some respects, your easier option might be to create your own "image index" when a page is published, so you can crawl the HTML and find them, for example.
However, if you are running version 8.6.*+ you might have access to the media tracking data that is stored in the database. This should be able to tell you where images are used so you can retrieve it that way. (I've not tried it, so I'm only able to try and point you in the direction of options I'm afraid)
Get specific propertytypes not based on alias
Hi.
I want to use the sitemap extension:
https://blog.spotibo.com/sitemap-guide/#4-2-image-sitemap-extension
Since there could be multiple pages with multiple properties that are images, how do I get all images?
This gets all media I guess. But I only want images.
This seems ok but not optimal. Any other suggestions?
Hi Carl,
It would depend on your version of Umbraco to be honest, but no that isn't going to cover all of your scenarios.
You have to consider content such as "Grid", "Nested Content" and RTE's as well as each of these add a deeper level of complexity. Not to mention any custom data types as well.
In some respects, your easier option might be to create your own "image index" when a page is published, so you can crawl the HTML and find them, for example.
However, if you are running version 8.6.*+ you might have access to the media tracking data that is stored in the database. This should be able to tell you where images are used so you can retrieve it that way. (I've not tried it, so I'm only able to try and point you in the direction of options I'm afraid)
Nik
Hi.
Umbraco 8.6 +.
I've tried to find how to access media tracking in code.
But there are no example code how to search for media for a specific page.
is working on a reply...