Better jpeg processing. Fix for Chrome delayed node insertions