PNGfix doesn't work with PNGs in imagefields, because those get a query string appended to prevent browser caching.

CommentFileSizeAuthor
#2 imagefield.patch709 bytesmatt2000

Comments

joachim’s picture

Only two solutions I found:

- hack the pngfix JS script file to use *= rather than $=. so this line

jQuery(this).find("img[src$=.png]").each(function() {

becomes

jQuery(this).find("img[src*=.png]").each(function() {

- override theme_imagefield_image() so the query string doesn't get added to the images.

matt2000’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new709 bytes

Joachim's fix works. Here it is in patch form.

joachim’s picture

Unfortunately, changing the pngfix.js script means that we'd be forking an external library... :/

matt2000’s picture

It's not an external library. If it were, it wouldn't be permitted to be hosted on drupal.org CVS ;-)

Or, you could say, we've already forked it by hosting it here.

The fork is necessary to make it functional with drupal, and conveniently makes hosting it here in line with d.o policy.