How to make the WordPress work like this that when i paste URL of a image to the blog post after publishing it will be replaced automatically with the image itself? I know there is the option to embed the image from the upload image window but i need to have a solution that works like i wrote. WordPress is in PHP.
Share
The risk with this approach is that you will be loading the exact size of the image you link. And if you plan to resize the image in by using
<img src='/path/image1.jpeg' width='..' height='...'/>, you’ll still be loading the original image.My idea is, you will add a filter for your the_content in your function to search for pattern of the pasted image using regular expression.