Post Thumbnail loosing Quality..Please help (2 posts)

Hey everyone, im having a problem figuring this out. I am displaying a random post on the header of my site but the post-thumbnail looses quality when I add a custom size. How can i make it not loose quality?