Media by url/path
# help-with-umbraco
s
Hey, I'm wondering if there is another way to retrieve a MediaItem from the Media section based on its URL. I'm using Umbraco v15 and currently have middleware where I need to process the MediaItem. The only way I seem to find is through IMediaService, but I would prefer not to fetch from the database. Instead, I would like to use the MediaCache.
m
is the
private readonly IMediaCacheService _mediaCacheService;
of any use? Failing that the examine index for media has urls that could be searched? https://cdn.discordapp.com/attachments/1344243991713157162/1344254472196460574/image.png?ex=67c03e09&is=67beec89&hm=f3a3f6b9534e454213251be0bf1a5abc25c76a995d92254bdad8375ea5b98de4&
s
Hey thanks for your answer Mike. I'm going to check those 2 options.
3 Views