I want to retrieve/query images stored by joomla k2 component (under the Image Tab).
相关问题
- Wrapping Angular components which has Parent/Child
- How can I change the Joomla administrator URL By P
- Castle Windsor: How can I update a components regi
- angular2 test, how to test event is bound to an el
- How do I disable a Creatable react-select componen
相关文章
- Fatal error: Call to a member function getKeyName(
- How to Properly Use Vue Router beforeRouteEnter or
-
React Native 0.57.x
large images low quali - Component without template
- How to set time to Android AnalogClock in app widg
- How to import Joomla to Azure?
- How to center images in a responsive grid with CSS
- offcanvas menu link broken
It's not stored in the database at all.
They use the md5 hash on the actual K2 item ID, and that is how they rename and save the image in the folder
media/k2/items/cache/
.Anywhere the K2 item is pulled up, they use
JFile::exists
(which is used to check if a file exists in the path set) with the pathand if the file is there, it shows the image.
Also, the
_XL.jpg
will change depending on what size the image is set to display on the page, be it a thumbnail, large, XL, etc.I know that isn't what you wanted to hear, but that is how they do it :) Hope that helps man!
Though you got the answer sharing the info may be helpful:
If working within the K2 Templates (Html overrides) following can be used to access the image added via K2 image tab.
OR
you get relative url : /media/k2/items/cache/29642a1d30cebf98734fb424b2b1316b_L.jpg
You can find the originals in the media/k2/items/src/ directory. Also, @David is correct, "Image" is needed as prefix to the k2 item id.
To display the K2 item image you can use this