fixed delete image function.

added in a split, which drops all extra in the url after the ?, and slice off remainder added on. Works well.