found new natak not loading 2025 all images and video. even url works fine when copy paste at url but not showing image using browsers so later found simple file name
Screenshot-2025-12-04-at-12.36.02.webp
From: Screenshot-2025-12-04-at-12.36.02.webp
To: Screenshot-2025-12-04-at-12-36-02.webp
// Add this to your plugin - automatically fixes dots in uploaded filenames
add_filter('wp_handle_upload_prefilter', 'dgc_auto_fix_upload_filename');
function dgc_auto_fix_upload_filename($file) {
$filename = $file['name'];
// Replace all dots in filename (except the last one for extension)
$last_dot = strrpos($filename, '.');
if ($last_dot !== false) {
$name = substr($filename, 0, $last_dot);
$ext = substr($filename, $last_dot);
// Replace dots with hyphens in the name part
$fixed_name = str_replace('.', '-', $name);
$file['name'] = $fixed_name . $ext;
}
return $file;
}
// Also fix when uploading via media library
add_filter('wp_handle_sideload_prefilter', 'dgc_auto_fix_upload_filename');





