bugfix for iframe expandos

minor efficiency improvement for image expandos (don't append until other manipulations are done)