Image functions and mobile detect