Adapt img resolution to avoid size warning