Optimize img position