When Allah granted Prophet Yusuf A.S. physical beauty it caused him to be locked up in prison. But when Allah granted him knowledge (interpreting the dream of the King), it not only took him out of prison but elevated his rank in society; clearly showing us the virtue of knowledge and that physical beauty does not mean everything..