Forest xGump on a bench with the text simple is as simple does.

Make H5P Quiz Images Go Big by Default

When you add images to H5P questions, the default behavior is to present them small. You can then click to make them go full size. We didn’t want to do that with the histology stuff. Luckily you can override the css as described here. I didn’t test this against other H5P options so it may do more than other people would like but we’re only using quizzes so this is fine. Jeff also got us most of the way there with some javascript and could have done it all that way as well.

H5P embed advanced options showing the dynamic sizing script option.

H5P Default Dynamic Sizing

If you’re running the H5P plugin in WordPress, you might notice that there’s an advanced settings option when you go to embed it. If you click on that you’ll see an additional script to add to enable dynamic sizing of embedded H5P content. I wanted that but that option doesn’t make much sense in our environment. If you read this blog a lot and have an amazing memory, you’ll know I have a plugin that’s network activated where I put little things that make sense but don’t need their own dedicated plugin. This seemed like one that fits that bill. It’s really simple. It asks if the site is running H5P and if the answer is yes, it enqueues the h5p-resizer.js.