Thanks for your reply. Actually, the image I want to display are already resized using ImageMagick. The part that I don't know how to do is, "knowing that an IMG request has come from the IMG tag". Because in the client side code[!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--] [code]IMG="http://a.abc-efg.co.jp/demo/Sample.jpg"[/code] [!--colorc--][/span][!--/colorc--], there is no PHP page being called.. The REQUEST will come to this [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]/demo/[!--colorc--][/span][!--/colorc--] folder under the document root. How do I handle requests coming to this folder? I want to call a PHP script when this (IMG="http://a.abc-efg.co.jp/demo/Sample.jpg) kind of requests comes in.. Hope my explanation is not bad...