I want to restrict my entire WordPress website but only allow entire /wp-content/
to be indexable because I am using API of this WordPress site in another website. Accordingly in my main WordPress website I have this in robots.txt:
# Disallow everything.
User-agent: *
Allow: /wp-content/
Disallow: /
# Certain social media sites are whitelisted to allow crawlers to access page markup when links to /images are shared.
User-agent: Twitterbot
Allow: /
User-agent: facebookexternalhit
Allow: /
But none of my images of the blog are visible on Google. Around 4 months have completed since I started the blog. What am I missing? How can I fix this so images appear on Google?