• When I upload a media file named, for example, “Red Car”, my site will default the URL path to https://www.mysite.com/wp-content/uploads/Red-Car.jpg

    This is great and exactly what I need, however, I noticed that some images are being uploaded with “-1” just before the “.jpg” such as https://www.mysite.com/wp-content/uploads/Red-Car-1.jpg even though there is no file with the same name.

    I’ve deleted the media and reuploaded but it still adds the “-1” and I’m completely lost on what to do next. I tried searching for a URL editor but the only thing I can find is a bulk editor for site migration.

    Any help would be greatly appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Andy,

    Does the site has WPML plugin installed? If the answer is yes, please head over to WPML support. The short explanation is that the plugin creates multiple records of one image for use with other language(s) but the image file itself will not be duplicated.

    In case it’s not WPML plugin related, make sure that you are actually seeing real duplicated images, not many different sizes of the same image (which is a feature of WP image management). Do nothing if it’s the latter case.

    For real duplicate images, just go over the upload folder via SFTP or cPanel and manually delete duplicates.

    There is also this plugin that do the job
    https://www.ads-software.com/plugins/media-deduper/

    Remember to have backup before deleting anything crucial.

    If you have any quesitons over this please feel free to ask.

    Thanks!

    Josh

    Hi @awallace39 ,

    Sorry. I don’t fully understand your question or issue.

    WordPress will incrementally add numbers to filenames if needed until filenames are unique. This is automagic. You shouldn’t try to mess around with this process since the file naming process is by design.

    Maybe you can elaborate on what your issue with WordPress’ built-in file naming convention?

    Please reference the docs to learn more.

    https://developer.www.ads-software.com/reference/functions/wp_unique_filename/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Media URL Path Issue’ is closed to new replies.