How to get the specific version of media item in Sitecore 9.1?
I tried the following url http://hostname/~/media/mediaitem.aspx?vs=1. But it is not working, still getting the latest version of Sitecore media item.
Any help is much appreciated.
I guess you are trying to access an image from your published DB [not master] with the URL. So whatever version number you pass in "vs", the published DB will always have only one version and whenever you access the image URL, it shows the same image/version all the time.
If you want to access multiple versions available in your master DB then first you need to check the option "Make uploaded media items versionable" when uploading the media/image item. If you check that then you could able to upload different images in each version and retrieve all the versions by passing "vs" querystring. But this can be done only when you access the image from master DB. Again if it is "web" db you see only one version all the time.
If you have a specific query/question regarding the media URL/versioning then update your question.