Changing generated image names (or accessing them programatically) (1 post)

  1. ModeratoMaestoso
    Posted 5 years ago #

    Hi guys,

    Is there a way to either a) change the various image names that are used for the image sizes or b) access the image names in PHP easily?

    I upload an image, which I then want to use getimagesize() on the *medium* image. At the moment the image is called something like [imagename]570x400.jpg.

    The problem is, I will always know what [imagename] is, and always know that it's 570px wide - which I have set the medium size at - but the height of the image is variable (why I need to use getimagesize() ). I don't know a simple way (well... any way frankly, being new-ish to PHP and WP) of loading THAT file into PHP to get the size.

    If the image were called something like [imagename]_medium, then I could always use that in the PHP.

    Any help appreciated!



Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 5 years ago by ModeratoMaestoso
  • This topic is not resolved
  • WordPress version: 3.1.3