wordpress-mobile / wordpress-mobile/WordPress-iOS

Media: Cannot view self-hosted images if traffic from Photon (i0.wp.com) is blocked

Open
#14,514 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Type] Discussion Media
Dominant language
Swift
Stars
3.9k
Forks
1.2k
Avg merge
23h 51m
Merged PRs (30d)
58

Description

Expected behavior

Media is loaded directly from the WP host if Photon (WP CDN) returns an error

Actual behavior

Cannot view media at all if Photon IP range is blocked

Steps to reproduce the behavior
  1. Block traffic from the IP range 195.234.109.0/24 to your WP host
  2. Open the WP iOS app and view media either in the media library or within a blog post
  3. Media does not load

This happens on a fresh WP install without Jetpack or any plugins installed.

Why does the iOS app insist on loading the images through Photon? And why doesn't it at least fall back to loading the images directly from the server if Photon returns an error?

In the logs it says "Unable to download image for attachment with url = Optional(https://i0.wp.com/...)

Tested on iOS 13.6, WPiOS 15.2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report concerns media loading in the iOS app's media library and blog-post views, with logs showing an i0.wp.com attachment URL. Start by tracing the image download path used by those views and reproduce with 195.234.109.0/24 blocked. Done means media loads directly from the WP host when Photon returns an error.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.