Parse links and images