phpthumb-processor seems to work better with this mods

had issues with thumbnails on some installations
did some mods, stolen from pThumb