nextcloud / nextcloud/unsplash

Wikimedia providers don't provide images

Open
#166 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
100
Forks
25
PR merge metrics
No merged PRs in 30d

Description

use GitHub reactions 👍 to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!

  • This is not a feature request
  • This is not an image-provider request
  • I have searched the issuetracker if the issue is not already reported.

Describe the bug:
The Wikimedia providers don't provide an image anymore. Root cause seem to be a missing user agent header in the image request, which Wikimedia requires for all requests, see the robot policy at https://w.wiki/4wJS, and further https://foundation.wikimedia.org/wiki/Policy:Wikimedia_Foundation_User-Agent_Policy.
This policy exists since 2010, but the bug only appeared recently, so I assume there was a change in curl behavior with PHP 8, maybe the user agent was sent by default before and is now empty.

To Reproduce:
Steps to reproduce the behavior:

  1. Set a Wikimedia provider in the Design settings

Expected behavior:
The image shows in the preview and as background after logoff

Server:

  • Nextcloud version: 31.0.8
  • Splash-App version: 3.1.0

Additional Information:
One can simulate the request with curl, e.g.: curl -H 'User-Agent:' "https://commons.wikimedia.org/w/api.php?action=query&generator=images&titles=Template:Potd/2025-09-03&prop=imageinfo&iiprop=url&format=json"

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

Trace the Wikimedia provider request from the Design settings and compare it with the curl example in the issue, paying particular attention to the User-Agent header and the Wikimedia API response. Done means Wikimedia images appear in the preview and as the logged-out background without violating Wikimedia's User-Agent policy.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.