I want to get the original image with the same width and height as uploaded.
My original image is 630*370.
Using the following function call I get a thumbnail sized at 630*198.
wp_get_attachment_image_src($PriImgId,array('630','370'));
How can I get it at 630*370
Try this :
Also, for more options see the Codex.
There’s wp_get_attachment_image_url introduced in WordPress 4.4.0.
It takes these arguments:
Returns
string
(full attachment URL including domain) orfalse
if no image was found.Example uses:
Image sizes are usually defined in functions.php of your theme. WordPress documentation covers this in depth: Post Thumbnails / Thumbnail Sizes
If an array of two numbers (width and height) is passed into the function, it tries to find the closets matching size while preserving the aspect ratio.
Under the hood it uses image_get_intermediate_size to find the preferred size.
I think you need to remove the quotes on ‘630’ and ‘370’.
Try this: