modified the name of the tmp directory for thumbnails to show that it belongs to pDLNA and added also using newFromJpeg from GD which fixes the problem on my site