Chief Alchemist - Business Consulting For The 21st Century Via A Holistic & Intelligent Approach
Share RSS 2.0 feed for Sign up for the mailing list. Follow Chief Alchemist on Twitter. 'Like' the Chief Alchemist's page on Facebook. See what Chief Alchemist has been Q&A'ing on Quora. Chief Alchemist bookmarks & highlights on Follow the Chief Alchemist on Chief Alchemist channel on Chief Alchemist on Flickr. Mark 'Chief Alchemist' Simchock on LinkedIn. Free Initial Consultation. Email Chief Alchemist. Phone Chief Alchemist.
  • Mark ‘Chief Alchemist’ Simchock
  • 'Email me.Email => ca .at. ChiefAlchemist .dot. com
  • 'Phone me.Alchemy United => 732 997-0028
  • Free initial consultation.Free => Initial Consultation
  • Please be sure to subscribe to your communication channels of choice.
  • Click To Close => The small green (consultation), red (email) or blue (phone) icons in the top upper right.
Business Consulting For The 21st Century Via A Holistic & Intelligent Approach

WordPress, Galleria errors and God bless the internet

FYI => As a result of my post “WordPress, Galleria and “Could not extract width/height from image” from a couple days ago, I connected with (photographer) Mark Barrett ( He left a comment on that post, I followed up with an email. Long story short, I think we’ve solved the WordPress vs Galleria problem.

Mark told me he found that if he edited (read: deleted) some of his WordPress theme’s CSS styling then the Galleria errors stopped. With that in mind, and a fresh pot of coffee ready, I was determined to put this to rest. BTW, it was the WordPress theme Twenty Eleven that my EZ Slider 1 plugin was having trouble with. On the other hand, with WP theme Twenty Ten EZ Slider 1  (that uses the jQuery plugin Galleria) worked just fine. I’m not sure what theme Mark is using.

Ideally this solution works for any theme. I guess we’ll find out. Here’s the fix:

1) Sure enough, if I removed this line from the Twenty Eleven style.css:

.entry-content img, .comment-content img, .widget img {max-width: 97.5%} /* Fluid images for posts, comments, and widgets */

The Galleria error stopped and the thumbnails were displayed. So the first thing you want to do is identify the specific CSS of your theme that Galleria doesn’t like.

2) Altering the theme CSS hardly seemed like the ideal answer. What if I want to have that max-width setting? So immediately below that line I added:

.galleria-thumbnails img {max-width:none }

In other word, for the images within the Galleria thumbnail div ignore any max-width settings.

Bingo! That did the trick.That’s it.  Problem solved. Hopefully.

To keep things neat and tidy I’m going to move this line to the Galleria CSS. Wherever you put it, just make sure it loads after any of your theme’s CSS that styles images within .content, or else where if your using Galleria some place other than within .content. For example, when I used EZ Slider 1 as a widget within Twenty Eleven there were no errors. it was when I tried to use EZ Slider 1’s shortcode within a post did Galleria flip out.

I’m also guessing that for some themes the solution might be height:none, or something similar. What CSS you “none-out” or somehow restyle to make it Galleria friendly is going to depend on what’s offending Galleria.

The point is, Galleria doesn’t seem to like it when a theme styles images in a way Galleria has not anticipated.

  1. Adam Sharif

    Wow, thank you so much for posting this – you have saved me a lot of time! :)

  2. Chief Alchemist

    You’re welcome Adam.

    fyi, I think when I bumped into this issue was i was using WP 3.3.x or 3.4.x. I suppose it’s possible that it will eventually resolve itself as WP updates and evolves.

    Glad I could help. If you get a moment and can share the link to this page on FB, Twitter, etc., that would be great. Thx.

  3. very helpful using Flickr API with Galleria in TwentyThirteen child theme. Thank you.

Will not be published. Required.
Please include http://