Fetching uploaded images using Link URL

I want to fetch that uploaded image re-size it into a thumbnail and
display it on the browser when i publish it..all of this
programmatically.. is there a way to do it?

You don’t need to do this manually. The add_image_size() function and the wp_get_attachment_image_src() function allow you to create and display alternate sizes for uploaded images.

Rather than running imagecreatefromjpeg() on every page load (which I assume is what you’re doing based on your question), you can just create the images on upload (i.e., once).