• Resolved lsapsweb

    (@lsapsweb)


    In the most recent version, uploaded images now have a number added to the end of the file name, depending on how many images have been uploaded (eg when I upload an image called image.jpg it is stored as image-0.jpg). Is there any way to stop this being added – I am using uploaded files in a club photo competition and would like ‘clean’ filenames.

    • This topic was modified 6 years, 11 months ago by lsapsweb.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Glad to help. At this time, the only way would be to edit a core file, which is not recommended in general. There should, however, be a way to disable the appended dash-number, so I will implement a filter hook in the next version of the plugin. Thank you for your feedback on this, it is appreciated.

    Plugin Author Jeff Starr

    (@specialk)

    Just to follow up with this, the next version of USP provides a filter hook to customize the appended string. For example, to always remove the appended string from the filename:

    function usp_customize_filename_append($append) {
    	return '';
    }
    add_filter('usp_filename_append', 'usp_customize_filename_append');

    Just add via functions.php or custom plugin and done.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Image file names’ is closed to new replies.