ayumee
9/22/2017 - 6:02 PM

Function to short image src path in entry post

On entry post, not on wordpress template

<img src="images/sample.jpg">
function imagepassshort($arg) {
	$content = str_replace('"images/', '"' . get_bloginfo('template_directory') . '/inc/assets/images/', $arg);
	return $content;
}
add_action('the_content', 'imagepassshort');