Wrap the images in <div>s with display:inline-block; position: relative. Then you can absolutely position your little badge images. For example:
<div class="wrapper">
<img src="http://placekitten.com/200/200" width="200" height="200">
<img src="http://placekitten.com/50/50" width="50" height="50" class="badge">
</div>
<div class="wrapper">
<img src="http://placekitten.com/250/200" width="250" height="200">
<img src="http://placekitten.com/25/50" width="25" height="50" class="badge">
</div>
And:
.wrapper {
display: inline-block;
position: relative;
line-height: 0;
}
.badge {
position: absolute;
bottom: 0;
right: 0;
}
And a live version: http://jsfiddle.net/ambiguous/sEH6L/
The display: inline-block and line-height will tightly wrap the <div> around the main image so that it will have the same size as the image, the position: relative is needed for the position: absolute on the badges; then you absolutely position the badge in the lower right corner of the <div> and you're done.