adjust image to square and when dir has no content, the appbarwill unable