fixing device image width and height