As stated in the earlier post, the image needs to be associated with a page for it to be treated as page media and therefore, have the media functions work correctly.
So your first 3 examples could work, while the last 2 (not inside user/pages) will not work:
for /user/pages/01.home/sample-image.jpg, if you were in on the home page you could just use 
for /user/pages/01.home/images/sample-image.jpg if you were on the home page again, you would have to put a path: 
For /user/pages/images/sample-image.jpg similar to above you need to reference the full path, but because it's in user/page it will still work: 