Image paths on custom post types getting /post_type/ added to path

I don’t get the exact scenario you are talking about, but you can try this:

First, you should get the url of your theme directory using

get template directory()

and just print the path it is getting for you using

<div> <?php echo ''.get_template_directory(); ?> </div>

, and relative to that you can add your image’s path (NOTE: It gives path without the trailing slash), like this:

get template directory()."/images/imagename.jpg"

assuming you have images folder inside your themes folder.

NOTE: In the case a child theme is being used, the absolute path to the parent theme directory will be returned. Use get_stylesheet_directory() to get the absolute path to the child theme directory.