A book has other content apart from the picture. So if you were to do something you would only remove or alter the picture to make it permissible, while causing no other damage to the book.
Further an image in a book is not hung or displayed in a place of respect. Rather it covered inside the book, and keeping such an image is permissible according to various madhabs. Also a 2d image is permitted to keep according to some madhabs. Remember that for example the Sahaba used Byzantine and Persian coins which had the pictures of their emperors.
Ref:
أما ما لم يظهر فيه أي من المعنيين، وذلك في مثل الصورة المطبوعة في كتاب، أو الموضوعة في درج أو خزانة أو على منضدة، من غير نصب. ففي كلام القليوبي نقلا عن ابن حجر وغيره: يجوز لبس ما عليه صورة الحيوان ودوسه ووضعه في صندوق أو مغطى
— Mawsoo’ah al-Fiqhiyyah
https://islamqa.info/en/answers/129673/