Joomla! K2 image naming...

/ Published in: PHP
Save to your folder(s)

If you wanna use images stored by K2 in your custom scripts/classes you'll need to know how K2 generates the names... (took me quite a bit to find that, because they're not stored in the _k2_items table)

Copy this code and paste it in your HTML
  1. // for example: to get the path for a large image
  2. echo '<img src="'.$_SERVER["DOCUMENT_ROOT"].'/media/k2/items/src/'.md5("Image".$item["id"]).'_L.jpg'" alt="" />';

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.