I'm looking for a bit of help using getimagesize in wordpress. Before I continue though, if anybody knows of a different way to achieve the same result (image size and file size in posts) please let me know, I'm not bothered how it works so long as it does lol
Currently I have:
<?php
$blah = getimagesize("myimagefile.jpg");
$type = $blah['mime'];
$width = $blah[0];
$height = $blah[1];
echo $blah[0];
echo ' x ';
echo $height;
?>
which will output the files dimensions, however, I am having trouble finding a way to make the file dynamically placed in the image location. This is even more of a problem when the above code will only work with a server path home/xxx/xxx/xxx/etc
Ok here is what I am trying to do:
1. Take the largest (full size) image and dynamically place the information into the above code
2. Convert the file location into a path, this could be achieved by using a static path upto a certain point, then stripping the code prior to the code strip.
like http://mysite.com/wordpress/uploads/folder/image.jpg everything before the folder name such as uploads, be stripped and placed into the remaining path such as home/xxx/xxx/wordpress/uploads/ stripped code here.
Any help? Any idea's? I must admit I'm stuck here and now. I don;t know much code so this might be really simple, I just don't know.
Anyway, thanks in advance :)