• Hello,

    I just upgraded to version 4.1. I’m trying to upload an image into the media library. But wordpress tells me: Error uploading image. The image-file is okay, I tried several images and formats which all show fine when opened in the browser.

    Having a look at /wp-content/uploads/2015/01/, there are some files created:
    1
    1-1024×576.
    1-150×150.
    1-300×169.
    1-825×510.
    Is it correct that there are no file-extension?

    Anyway, although WP tells me the upload went wrong, the media-lib shows one “broken” image. Having a look at the html-source, I get:

    <img src=”https://www.example.com/wp-content/uploads/205/0/1-300×169.” draggable=”false” alt=””>

    So, WP changed “/2015/01/” to “/205/0/”??

    I uploaded a 2nd image. The files correctly appear in /wp-content/uploads/2015/01/ like the 1st image, but the media-lib shows as source:

    <img src=”https://www.example.com/wp-content/uploads/015/01/2-300×169.” draggable=”false” alt=””>

    This is totaly strange, now “/2015/” becomes “/015/”? At least the /01/ afterwards is correct. Looking at the DB table wp_posts, I get as guid:
    https://www.example.com/wp-content/uploads/2015/01/2
    which seems to be right.

    Any idea what might be wrong?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Disable all plugins and see if the issue persists. If not, re-enable each plugin one by one until the issue returns to determine which plugin is causing the conflict. If the issue persists even with all plugins disabled also try switching to one of the default (twenty*) themes.

    Thread Starter canguo4

    (@canguo4)

    Thanks for your reply. I disabled all plugins, but the problem still persists. I already use the Twentyfifteen-Template. Strange thing, I assume nobody else is having this problem with 4.1?

    Thread Starter canguo4

    (@canguo4)

    Okay, in the network-tab I see that the uploader is returning:
    <b>Warning</b>: preg_replace() [function.preg-replace]: Compilation failed: unknown option bit(s) set at offset 0 in <b>/home/wp-includes/formatting.php</b> on line <b>1074</b>

    I will investigate in this direction.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Uploading images to media-lib gives wrong pathes’ is closed to new replies.