Retain the original name of the image on resize

You can simply use preg_replace() functions to remove -800x667 (or any height) from the image.
Like this-

$image = generate_filename( NULL, NULL, 'jpg');
echo preg_replace( '/-800x[0-9]{2,4}/', '', $image );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)