Hello. I have some PHP code which retrieves news posts from my forums and displays them on the front page of my website. Everything works fine, but I need a way to get the thumbnails for image attachments. At the moment, I'm using preg_replace to replace bbcode, as well as the [attachment] tag.
So [attachment=13:MyImage.png] is replaced with:
<a href='/ipb/index.php?app=core&module=attach§ion=attach&attach_rel_module=post&attach_id=13'>
<img class='thumbnail' src='/ipb/index.php?app=core&module=attach§ion=attach&attach_rel_module=post&attach_id=13' />
</a>
The problem is that the above URLs retrieve the full image, which is bandwidth intensive. I just want the thumbnail image, and then if the user clicks on it, they will be taken to the full image. I'm using CSS to resize the full image at the moment which isn't ideal.
So if "/ipb/index.php?app=core&module=attach§ion=attach&attach_rel_module=post&attach_id=13" retrieves the full image, is there a link to retrieve the thumbnail?
URL for attachment thumbnails
Started by kj512, Today, 03:50 PM
No replies to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users















