Trim image filename to avoid File not found error because of leading or trailing spaces in the config