• OK, the title of this post is a bit inaccurate, so let me explain. πŸ™‚

    I’m a photographer with >2000 photos on my WordPress site. While SEO is important, image organization is also important. My image filenames usually have 4 or 5 numeric characters which help TREMENDOUSLY locating an image that a client is talking about in my digital asset management software.

    My filenames are usually something like “Seascape-Photo-17384.jpg” (crude example).

    I’m only using Media File Renamer’s manual rename option at the moment (still quite happy to HAVE that feature!) because I really do not want to lose the numeric image identifier in the filename.

    Perhaps it would be possible to add some kind of “wildcard matching” pattern to the file rename feature (presets, or something like that) to somehow preserve certain parts of a filename (I’m not a programmer so I’m rather clueless).

    Cheers
    Alexander.

    https://wordpress.org/plugins/media-file-renamer/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Yo Alex,

    This would be a very advanced and difficult feature to add because it would never fit everybody’s purpose. However, I am giving the chance for an user (or more like a developer) to define his own renaming rules through coding.

    Even for me, it would be easier to code this independently for all my users than adding a very heavy and complex option.

    Basically it works with a filter that you can write anywhere (your theme, own plugin…).

    add_filter( 'mfrh_new_filename', array( $this, 'filter_filename' ), 10, 3 );
    
    function filter_filename( $new, $old, $post ) {
      return "renamed-" . $new;
    }

    This filter above would actually use the new filename decided by the plugin but would add “renamed-” at the beginning. You could do something like that except that you would capture the ID you have in your old filename (or somewhere in your post) and add it at the end of the new filename. And that would work πŸ™‚

    Plugin Author Jordy Meow

    (@tigroumeow)

    By the way Alex, I am sure you would have something to say about this so I would like you to join this discussion (even though it hasn’t really started yet): http://apps.meow.fr/lightroom-galleries-wordpress/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Feature Request: preserve numbers in file name’ is closed to new replies.