Could not extract width/height from image: http://www.mysite.tld/sites/default/files/styles/galleria_thumb/public/2.... Traced measures: width:0px, height: 0px.

Works fine in Chrome and Safari.

Files: 
CommentFileSizeAuthor
#24 galleria-1.2.6_try_catch_patch.js_.txt150.76 KBpivica

Comments

There are also other issues about that.
Note that the galleria (JS source) plugin itself has also some limitations and (i really hope) they work on this.

You can set some width / height manually in your css for the container and it will work. But since we don't know your params, we cannot set them in our theme.

What would be the best example to set them in your theme? Wading through this css is somewhat a nightmare at this time.
This seems to work setting them up with views jqfx galleria. Not a problem there. Thanks for your help.

Have you tried setting an explicit width and height in your option set?

If you are referring to the Galleria configuration option settings yes. I am using the default option set which has the height and width specified for example 300 x 400.
As I said above the gallery renders fine under Chrome & Safari browsers. But not under IE or Firefox.

Hm, although I suspect it's a bug in the library and not in the module, would it be possible for you to give us a link to your page where the problem occurs?
If you don't want to post it to the public, you can also send it to me by mail.

Status:Active» Closed (works as designed)

Thanks for sending me the link.

I don't know what causes Galleria to fail, I just suspect some unfortunate CSS, but found an issue at GetSatisfaction with a workaround that you can try.

I close this issue here as it's not a bug with the Drupal module.

Category:bug» support
Status:Closed (works as designed)» Closed (fixed)

@kroiman ~ Thanks for the link at GetSatisfaction.

I applied:

Solution:
Replace code "Galleria.raise('Could not extract width/height from image: ' + img.src +
'. Traced measures: width:' + img.width + 'px, height: ' + img.height + 'px.'); " wit this try catch block :
try {
$('<img/>').attr('src',$(img).attr("src")).load(function() {complete.call( this )})
} catch(error_message) {
Galleria.raise('Could not extract width/height from image: ' + img.src +
'. Traced measures: width:' + img.width + 'px, height: ' + img.height + 'px.');
}

to galleria-1.2.5.js and this solved my problem.

I tried changing the snippet in the .js but it didn't work for me. It workes fine on Safari but not in Firefox.

Problem seems to be theme (CSS) related. Works fine in e.g. Bartik. Could you maybe elaborate on your CSS solution?

The module also pulls in galleria-1.2.5.min.js. So unless you make changes in both the files it may not work.

I have applied the change to galleria-1.2.5.min.js as well but no change...

For the problem occurs in connection with the Corolla theme, I opened an issue there
http://drupal.org/node/1313054

I posted the issue also here and got the reply that it could be related to slow servers and / or the div order.

Could still find no solution though.

I am using Corolla as well but with Footheme.

Would you be so kind and upload the changed .js files somewhere? eventually I made a mistake in placing the snippet. I tried it twice though...

@sdk: You don't have to change it in both .js files. You can just change it in the non-minified version and delete the minified version. The module will then use the non-minified version, which is way easier to modify.

@all: Can you somehow try setting the Galleria width&height using CSS? If that fixes your problems, I could add an option to the module to set the size via CSS, not the default way of just giving these values to the Galleria javascript.

@kroimon, I would of done that in the beginning but Adaptivethemes is a monster to get your head around...especially if you are adding the sub-themes. Also I think Views jQFX Galleria has that option and I experienced no issues with it.

Status:Closed (fixed)» Needs review

I'm having this exact same problem RIGHT NOW and I'm using adaptive themes. It hasn't been a fun evening, that's for sure. All the CSS changes I'm seeing floating on the web? Not working. This .js change? Didn't work. When I pulled the plug on the party with minified .js ALL of them stopped working.

I need an answer to this now. How do I get galleria's module to actually work in IE7+ in Drupal? (works fine in Chrome)

Status:Needs review» Active

@Craigotron: Not the best start to enter a discussion, hm? I understand you're angry, but we're all doing this in our spare time, and we're not the ones who develop the Galleria library, just the Drupal module to embed it into a Drupal site. So if you need an answer "now", then start debugging yourself, which is the same we would have to do otherwise.

To help you a little: I think, the problem somehow depends on the site's CSS. To verify this assumption, please check if it works when you switch to the default Drupal 7 theme (Bartik).
Then, try to temporarily delete/disable one half of your CSS statements of you real theme. If it still errors out, try to disable the other half and reenable the first half. I think you get it. Try to narrow it down to the CSS rule(s) that cause the problem and report it back! :-)

I had a similar problem to this...

If you have this line in your css somewhere possibly in a reset or normalize.

img {max-width: 100%;}

Then qualify it or get rid of it...

Worked for me...

@Craigotron:
Would be great if you could check what cat-topanga proposed and report back again!
Otherwise I'll close this issue again in a few days as being fixed...

Status:Active» Fixed

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Had the same problem for IE7/8/9. Tried different solutions + updating to galleria 1.2.6 like suggested in http://getsatisfaction.com/galleria/topics/could_not_extract_width_heigh... - this didn't helped also.

On the end the only thing that worked was wrapping that Galleria.raise error with try/catch block like suggested in http://getsatisfaction.com/galleria/topics/could_not_extract_width_heigh...

@pivica I didnt understand what is the final sintax.
Can you upload the full one?

Thank you

StatusFileSize
new150.76 KB

Here it is. Changes are on line 4796 and 4797. That two lines are changed with this

try {
  $('<img/>').attr('src',$(img).attr("src")).load(function() {complete.call( this )})
} catch(error_message) {
  Galleria.raise('Could not extract width/height from image: ' + img.src +
    '. Traced measures: width:' + img.width + 'px, height: ' + img.height + 'px.');
}

Thank you.
Unfortunately I am still getting the same error..

Run in the same issue. The thread helps to find a solution.
No need to patch the js file, just add to your css

.galleria-content img {
max-width: none !important;
}

that worked for me, thx

Unfortunately, I've tried both the try/catch fix (#24) and the max-width:none fix (#26) (see my previous thread in #1402952). I've also tried running galleria 1.2.7a2 with and without the try/catch fix.

Firefox, Chrome, Opera all work okay, but no version of IE works at all. At this point, I think I just have to give up on Galleria. Too bad, it's a nice script when it works.

It may help someone to note related/dupes of this here (all mentioned already I think, but just to have them conveniently together)

#1402952

#1313054

https://getsatisfaction.com/galleria/topics/could_not_extract_width_heig...

At this point, I'm just looking for a Galleria alternative.

IE9 Works

Arigato!

Thanks for your help, it work on ie8

upgraded to the latest galleria (1.2.8), it works fine.

#18 worked for me. I'm using zen theme, and it added in its normalize.css

img {
  border: 0; /* 1 */
  -ms-interpolation-mode: bicubic; /* 2 */
  /* vertical-align: bottom; */ /* Suppress the space beneath the baseline */
  /* Responsive images */
  /* @todo Add responsive embedded video. */
  max-width: 100%;
  height: auto;
}

after removing the width and height, it worked.

I was fairly new to the Drupal community when I posted this. Following up a few things. Shortly after this post I gave up on Galleria - even though I paid for it - and moved on to something else.

Downloaded 1.2.9 and it fixed the problem for me.

#26 worked for me, though my galleria content was wrapped in different HTML so:

.galleria-container img {
max-width: none !important;
}

Fixed broken image gallery with multiple error messages:
Could not extract width/height from image: http://www.mysite.tld/sites/default/files/styles/galleria_thumb/public/2.... Traced measures: width:0px, height: 0px.

Using Zen theme, but dont want to qualify the img { max-width: 100% }, the fix in #7, also mentioned in this comment here, worked perfectly:

https://getsatisfaction.com/galleria/topics/could_not_extract_width_heig...