Support » Plugin: Custom Upload Dir » Category and postname don’t work anymore

  • Resolved Jabe



    I really liked your plugin but it seems that some options don’t work anymore with last WordPress.

    For example :
    %category% and %postname%

    Do you plan any update of your plugin?

    Please let me know

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ulfben


    WordPress 5.x is doing something funky with uploads if you’re using the Gutenberg editor. My plugin filters on ‘upload_dir’, and all uploads should pass through there. But the Gutenberg blocks “Image” and “Gallery” either bypass that filter, or doesn’t provide the $post context.

    There is a workaround: when creating a “Image” or “Gallery”-block, don’t use the upload-button! Instead click on the “Media Library” button and upload your files there. Their paths will be correct.

    I don’t know if I’ll ever have the time to dive into WP and figure out why this happens (perhaps there is a new filter we should be using to modify ‘upload_dir’?). If you or anyone else can clue me in I’d be more than happy to patch the plugin.

    • This reply was modified 2 years, 10 months ago by ulfben.
    Plugin Author ulfben


    Figured out a workaround and updated the plugin. It should work with the Gutenberg blocks now. Just make sure you’ve named- and saved the post before attempting any uploads.

    Thread Starter Jabe


    Hi! Thanks a lot for this fast answer and fix!
    It’s perfectly working again. I added 5 stars review.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Category and postname don’t work anymore’ is closed to new replies.