Can anyone give me a good advice or sources to learn to write decent metaphors and similes? I try to notice ones I find in books and upon reading them, they make sense, but I have trouble coming up with my own.

I'm looking mostly for books that do this well. Links are good too.