The plugin previously only applied it to the <img> element.
Thanks to your feedback, we’ve added a new function in the latest update (1.3) that now also applies it to background images, like this:
<div class="myelement" style="<?= MFP_Background($image_id); ?>">
</div>
This update adds the cover, background-image, and background-position.If you’d like to add it without the background-image, you can use this:
<div class="myelement" style="<?= MFP_Background($image_id, false); ?>">
</div>
We hope this update makes things easier for you. If you have any feedback, feel free to let us know.