@hakubo, so imgTitle won't be set if currentMedia.type isn't image or video?  I moved the imgTitle var outside of the conditional so it's set at the top of the function - just wanted to make sure before I assume that if imgTitle isn't set I should assume it's not a video/image and remove the file param from the URL.