move image to a char to avoid image duplications and fix some issues