delete img and fix getPosts