PB/WordPress ignoring alignment attributes?

Does anyone have insights into PB and/or Wordpress ignoring alignment attributes? We are seeing this more and more frequently on our Ohio State instance. Screenshots attached show an example image in both the visual editor view (as it should appear) and the incorrect output rendered on the site. It doesn’t happen to all photos - or even a majority of them - just seemingly random occurrences and I can’t seem to make sense of it.

Code from the Text Editor:

<span><b>EF:</b> Si usted pudiera hablar de ese momento de orgullo, ¿A quién le agradecería usted? </span>

<img src="https://osu.pb.unizin.org/latinxstories/wp-content/uploads/sites/55/2017/08/Screen-Shot-2017-08-25-at-10.04.20-AM-220x300.png" alt="Collage of images of John Alvarez" width="220" height="300" class="alignright size-medium" />

<span><b>JT:</b> Mi abuelita, mi abuelita. Ella, ella fue como mi segunda madre. Ella siempre fue mi cheerleader. Cuando yo estaba para mi bachillerato ella conocía a mis profesores, yo vivía con ella cerca de la universidad de Central Florida, y ella siempre iba a mis cosas y también ella traía amigos míos para que le haga comida (risa) uh, típica abuelita. If you yawn, you’re hungry, she makes you food.

What theme are you using?

This particular book is Open Textbooks. I am not sure that all the books that have experienced this are using that, but it is our recommended theme. I’ll try momentarily swapping it out and see if that has any effect.

Changing the theme did seem to fix it in this particular instance. Though it added some other issues with padding, the alignment corrected.

Hi Mike–I meant to reply to you some time ago. We noticed the same thing on our books that were using Open Textbook, which means that @brad may know most about this. I meant to look up what the fix was, but I forgot. If I remember correctly, it only affected images with captions, and was a CSS fix. Let me see if I can dig up how we resolved it …

I am having similar issues, in the Malala theme. (We want to keep this specific theme because we are creating a textbook.)

PressBooks won’t consistently center images in the preview, even when we select Edit > “centered” alignment for each image. Can anyone help us troubleshoot image alignment?