Hi there,
I believe there are a handful of Wordpress plugins which allow you to simply place in a direct URL path so in your instance http://www.site.com/gallery/image/picture.png could be redirected to http://www.site.com.
The main thing to keep in mind is you use a 301 redirect for this process to ensure all link equity is maintained during the process.
A good plugin for doing 301 redirects on wordpress is - https://en-gb.wordpress.org/plugins/redirection/
I hope this helps!