check if mobile switch
optimised checking if mobile
auto img resize