7 Replies Latest reply on Oct 1, 2006 2:34 PM by Newsgroup_User

    Detecting Image Width

    weswhite7
      I want to detect the image width so if it is larger than a certain size, it will resize it down to a certain size, otherwise, it will leave it alone. I assume it is a simple cfif statement. The problem I believe I might have is that the file is already on the server.

      I want to do this during the output stage on the page.

      So if I have
      <cfoutput query="thisquery">
      <cfif (the width is greater than say 200 px show this image)>
      <img src="#img1#" width="200">
      <cfelse (for an image less than 200px or whatever the set width is)>
      <img src="#img1#">
      </cfif>
      </cfoutput>