""" Better Figures & Images ------------------------ This plugin: - Adds a style="width: ???px; height: auto;" to each image in the content - Also adds the width of the contained image to any parent div.figures. - If RESPONSIVE_IMAGES == True, adds style="max-width: 100%; height: auto;" instead - Corrects alt text: if alt == image filename, set alt = '' TODO: Need to add a test.py for this plugin. """ import os from pelican import signals from bs4 import BeautifulSoup from PIL import Image def content_object_init(instance): if instance._content is not None: content = instance._content soup = BeautifulSoup(content) # if '