Topic on Project:Support desk

Issue with uploading images to wiki

6
Carter.smith1 (talkcontribs)

I want to put a image on my wikipage. All of the methods for putting photos on a wiki page include using the url where the image is located on the internet. My issue is that the photo is saved to my machine and does not exist online. The image is under /home/carter/Photos. I'm using Ubuntu 22.4. Let me know if you have any solutions. Thanks

Bawolff (talkcontribs)

Upload it using the page named Special:upload or importImages.php from command line

Carter.smith1 (talkcontribs)

This is the error I get when I try to upload throught the Special:Upload page:


Could not open lock file for "mwstore://local-backend/local-public/1/16/Gitlab-fork.png". Make sure your upload directory is configured correctly and your web server has permission to write to that directory. See https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgUploadDirectory for more information.

Bawolff (talkcontribs)

Usually that means there are incorrect permissions on the images directory (or one of its subdirectories) in your mediawiki folder. Ensure the webserver can write there.

Carter.smith1 (talkcontribs)

I'm getting an error that says:


No suitable files could be found for import.


I've read this sometimes means that the directory does not have permission so I tried to run:


sudo chmod -R 777 Photos


I'm not sure why it is not working. Let me know. Thanks

Carter.smith1 (talkcontribs)

I found the solution when running this command:

php maintenance/importImages.php /path/to/images/directory


I had this at the end: /Photos/The-name-of-the-image


The issue is the command only needs the directory name where the photos are located, not the actual name of the photo.

Reply to "Issue with uploading images to wiki"