Posted By

tiw on 10/11/08


Tagged

textmate mw


Versions (?)

image url


 / Published in: Other
 

  1. $title = Title::newFromText($v, NS_IMAGE);
  2. $image = Image::newFromTitle($title);
  3. if ($image && $image->exists()) {
  4. $url = $image->getURL(); # Gets the URL for the image at its normal size
  5. $url_50px = $image->getThumbnail(50,50)->getUrl(); # Gets the URL for the image at a specified size
  6. }

Report this snippet  

You need to login to post a comment.