Apply to content images

My specific question is related to Lightbox, but it actually quite general:
How can I apply transformations to images/medias that are rendered from a Markdown content block ?

I have the most classic situation, articles displaying images inside their content. And I would like to add to those images Lightboxes so that we could click them.

Obviously, I could display all images using a loop and add the Lightbox functionality. But, it is not an acceptable solution, I need the images to remain inside the Markdown content.