WordPress-iOS
WordPress-iOS copied to clipboard
Can't post photos
Expected behavior
Include photos in post and publish.
Actual behavior
In the editor I get an error that "Can't place media" when I try to include a photo. I retry but with same result. Sometimes it shows the error message "WordPressKit.wordpressorgxmlrpcapierror 0", at other times it says it may be because the photo is to big or has the wrong file format. The strange thing is that the photo is actually uploaded to the server, I can see the photo in the upload directory on the server, and in the media library in Wordpress Admin Panel.
I can't publish the post, it says it needs an internet connection, even though I already am connected to the internet.
I also get error message, "There was a problem when trying to view media" when accessing the media library in the app.
I've been in contact with my hosting provider to make sure xmlrpc is not blocked.
Steps to reproduce the behavior
Create new post, include photo, try to publish.
Tested on [device], iOS [version], WPiOS [version]
Self hosted Wordpress site. iPhone X, iOS 13,3, WPiOS 13.8.1, Wordpress 5.3.2
The issue I had with uploading photos has been resolved to some degree by some try and error. The partly solution for me was to change the app-setting for "Maximum resolution size of uploaded photos". Some photos still "time out" and requires retrying several times before they may eventually succeed in uploading.
I had that setting set to "Full size". When I lowered the setting to 2400x2400 the problem with uploading photos partly disappeared.
I still have the problem with loading photos in the media library.
Thank you for reporting this issue!
For this type of error, it would also be helpful to note:
- Type of site (Self-hosted, Jetpack, or WordPress.com)
- How you are logged in (Continue with WordPress.com, Continue with Google, Continue with Apple, or log in by entering your site address)
I will do some additional testing when I can, but wanted to ask those questions in the mean time. More soon!
The site is self hosted. I log in by entering my site address and providing username and password.
Going back through your description, I'm hearing multiple issues some of which may be related but some which may not be related:
- "Can't place media" when trying to add a photo to a post in the editor.
- "WordPressKit.wordpressorgxmlrpcapierror 0" when trying to add a photo to a post in the editor.
- Photo is too big error when trying to add a photo to a post in the editor.
- Wrong file format error when trying to add a photo to a post in the editor.
- In items 1 to 4, the photo gets uploaded to the media library regardless of the error.
- Cannot publish a post after seeing any of the errors noted in items 1 to 4.
- "There was a problem when trying to view media" when accessing the media library in the app.
- "Time out" error happens sometimes when trying to add a photo to a post in the editor.
You mentioned that updating the app-setting for "Maximum resolution size of uploaded photos" to 2400x2400 resolved items 1 to 6 — am I reading your follow-up comment correctly?
To try to test this myself, I set up a new testing site running WordPress 5.3.2 with no plugins an tried the following testing steps:
- Using a self-hosted site without Jetpack installed, log in by entering your site address.
- Go to My Sites > Settings and note which editor is in use (the original issue doesn't mention which editor is being used, so we will want to test both).
- Go to My Sites > Blog Posts > +.
- Add a title, a paragraph, and an image.
- Go to My Sites > Media and check to see if you are able to view all media for the site.
- Go to My Sites > Settings, toggle the "Use block editor" setting, repeat steps 2-5.
Results: I was able to add images to posts in the editor and view images in the media library in the app without any problems in my testing. This indicates that the image problems described in the original issue are most likely due to either a server misconfiguration or a plugin conflict.
Tested with WPiOS 13.9.0.2 on iPhone 6S iOS 13.3.
The problem where you are unable to view images in the media library in the app may be caused by either the host blocking communication with the app (often by placing limitations on XML-RPC, so it's good that you already checked that) or it can also be caused by a plugin conflict. The standard next step for troubleshooting a case like that would be to temporarily disable all plugins and try again and if viewing media works then re-enabling each plugin again one-at-a-time until you discover which one has a conflict. If you cannot find a conflict with any plugin then it's still possible that something on the server side is blocking the app from communicating with your site but it may be a bit harder to uncover the details in that case and I would recommend contact support for more in-depth help at that point.
If you need to contact support, it would be helpful to include:
- A copy of the app logs from right after triggering each problem that still needs troubleshooting. You can find the app logs in Profile > Help & Support > Activity Logs > Current and you should be able to tap the share icon and copy the logs so you can paste them into a reply to support (do not include them here because they will contain token information which is better not to share publicly).
- The name of your hosting provider.
- Which editor are you using (the block editor or the other one)?
- Which option are you using to add photos in the editor (Choose from device, Take a Photo, WordPress Media Library, Other Apps)? (screenshot)
- Any details about the images having problems that may be helpful to know, i.e. are these images that were taken with your phone directly or downloaded? Were they modified in any way before you tried to upload them? How large is a typical image that you are having trouble uploading? Are smaller sized images uploadable and viewable in the media library without any problems?
- Are you able to view some images and not others in the media library in the app or are you blocked completely by the error there?
- Are the images you are having trouble viewing in the media library in the app the same ones that had the upload problems you described earlier?
In Slack, a user reported a similar issue:
I have a problem with the app on iOS.
A client of mine sometimes when uploading image to article, it seems that it does not upload the image, with error message “Failed to insert media. Please tap for options”, but on backend the app was uploaded it, as a result the app is uploading the image multiple times.

https://wordpress.slack.com/archives/C02RQC4LY/p1600440128000700
UPDATE: Got some more information:
- What version of the app are you using (My Setings -> User Icon in top right of screen -> Help & Support -> Version)?
- Version 15.6
- What kind of site is this (self-hosted, jetpack, WordPress.com)?
- Self-hosted
- How are you logged into the app (Continue with WordPress.com, Continue with Google, Continue with Apple, or log in by entering your site address)?
- Log in by entering website address
- Does this happen for all images, or only certain images? If it’s just some images, does it always fail to upload those images? What type of image file is it and how large is the file?
- He doesn’t know what type of images he uploading but from my searching on media files I noticed it’s on .jpg and .png filetypes. The resolution that he uses is 700X700.
- Does the failed-to-upload image show up in the media editor in the app (My Site -> Media)?
- Yes
In Slack, a user reported a similar issue:
This user you refer to above has now sent some logs, which includes lines such as:
2020-09-24 10:38:33:520 Error uploading media: Error Domain=WordPressKit.WordPressComRestApiError Code=7 "Invalid response from the Jetpack site" UserInfo={WordPressComRestApiErrorCodeKey=json_syntax, WordPressComRestApiErrorMessageKey=Invalid response from the Jetpack site, NSLocalizedDescription=Invalid response from the Jetpack site}
The json_syntax
part makes me think that this user's error is very similar to: https://github.com/wordpress-mobile/WordPress-iOS/issues/14916 and might not be related to this issue.
I am removing the high-pri status from this issue. We will potentially add this issue to a "Media improvements" project starting in the near term.
This issue has been marked as stale because:
- It has been inactive for the past year.
- It isn't in a project or a milestone.
- It hasn’t been labeled
[Pri] Blocker
,[Pri] High
, orgood first issue
.
Please comment with an update if you believe this issue is still valid or if it can be closed. This issue will also be reviewed for validity and priority during regularly scheduled triage sessions.
I have exactly the same issue: Self hosted WP 6.1.1 site with Jetpack installed Using Jetpack iOS app to post and images fail to upload in app but they are now in media gallery. If I add the image from the WP media gallery in the app it still will not allow me to publish the post and it adds another copy of the image to the media gallery Everything works fine if I add the post from the desktop browser interface
I have the same issue as well and I'm using Wordpress.com
Same issue on Android App. When uploading fullsize images from phone, the app reports the error, however the website has recieved the full image. No apparant errors in webserver logs