Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.
For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email email@example.com.
I have a php script that displays a random image and I’d like to store those images in the images directory for the currently selected skin. I assume there’s a way to get the directory for the current skin, so instead of using skin/frontend/default/default/images/image.jpg, I’d like to use Magento’s code to get the correct path to the images folder (in case the skin changes in the future). Anyone know how to do this?
That helps, but it gives me the URL, not the directory. The problem is I’m using a script to get a random image from a directory, and a URL doesn’t work for that (AFAIK). I did find a way around it, but I’m not sure how good a solution it is: