fix file image edit aspect ratio, update and size on switch tab