• Hello and good day everyone.

    I simply wish to know if there is a way to get the image’s height and width if all we have is the image’s link. I’ve tried various php codes for this, but those codes don’t seem to work on WP.

    Any help would be greatly appreciated. Thank you~

Viewing 2 replies - 1 through 2 (of 2 total)
  • Using php function:getimagesize may work. https://php.net/manual/en/function.getimagesize.php

    Thread Starter destinedjagold

    (@destinedjagold)

    I’ve already tried that, however, it doesn’t work. =(

    But I decided to try again, yet it still isn’t working.
    Then I decided to try and get the dimensions of an image outside of my wordpress uploaded folder, and I was successfully able to get the dimensions.

    Now I wonder if the reason why I couldn’t get my image dimensions is because my site is currently password protected? My site is almost done, but I’m just doing some slight modifications here and there, and users are asked for a username and password to access the site and the wp-admin page.

    So yeah, is that the reason why I couldn’t get my uploaded image’s dimensions?

    Thanks~

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Getting Image Size With Link’ is closed to new replies.