[JS] - Added fallback to img type if type set doesnt exist