""" Better Figures & Images ------- This plugin: - Adds a style="width: ???px;" to each image in the content - Also adds the width of the contained image to any parent div.figures. 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 '