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.


How can I get it at 630*370


Try this :

wp_get_attachment_image_src( $PriImgId, 'full' );

Also, for more options see the Codex.

  • 1
    wp_get_attachment_image_src($PriImgId, 'full')[0]; will give the exact link – Killer Jul 31 '17 at 23:55

I think you need to remove the quotes on '630' and '370'.

Try this:

wp_get_attachment_image_src($PriImgId,array( 630, 370 ) );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.