Fix image optimization

Make sure all the images start and end in the right directories.