posts with big names – suggested solution
-
Sorry my english, I’m using a translator.
When the post has a very long name, which is common although wrong, it creates files with huge d images and names that generate problems with backup plugins that can not compress these files.So if some lines are changed, this problem is avoided.
Below is my modification to correct this problem.on line 308 of version 2.4 of the plugin, where it is found:
$new_filename = urldecode( basename( get_permalink( $post_id ) ) ) . $image_extension;switch to:
$new_filename = urldecode( basename( get_permalink( $post_id ) ) ); $new_filename = strtolower( sanitize_title( substr( $new_filename, 0, 16 ) ) ) . $image_extension;this way the name is created, but with the character limit, which prevents the file is with a very long name, solving the problem.
In addition also corrects unwanted characters clearing the name of things like @ ( ) and uppercase letters.
I would like to see this fix in a future version and I hope I helped in some way.
The topic ‘posts with big names – suggested solution’ is closed to new replies.