Closed mbarram closed 8 months ago
Private images are only served via the wiki's /img_auth.php
(in the same directory as index.php
and api.php
).
They are not served directly from S3.
"Thank you very much for the response. So, what should I do to make my images visible in the wiki? Should I allow public access to the images in S3?"
URLs like /img_auth.php/logo.png?20231222135434
are correct and should be working.
Investigate why they aren't. This script (img_auth.php
) is a part of MediaWiki core, and it not working has nothing to do with this extension.
Thanks again for the reposponse.
2023-12-26 18:48:59 e4246cd0f86d wiki: S3FileBackend: found backend with S3 buckets: main-eb-app-assets/wiki, main-eb-app-assets/wik
i/thumb, main-eb-app-assets/wiki/deleted, main-eb-app-assets/wiki/temp. (private wiki, new S3 objects will be private)
2023-12-26 18:48:59 e4246cd0f86d wiki: S3FileBackend: doGetFileStat(): obtaining information about wiki/thumb/Aws-logo.png/2560px-Aws-logo.png in S3 bucket main-eb-
app-assets
2023-12-26 18:48:59 e4246cd0f86d wiki: FileBackendStore::ingestFreshFileStats: File mwstore://AmazonS3/local-thumb/Aws-logo.png/2560px-Aws-logo.png does not exist
I was investigating the issue and I believe there are problems with the thumbnails.
Currently, only the 'temp' folder is created in my bucket. Thumbnails are not visible because MediaWiki can't find the files. Here are some logs that illustrate the issue:
2023-12-26 18:54:02 e4246cd0f86d wiki: FileBackendStore::ingestFreshFileStats: File mwstore://AmazonS3/local-thumb/archive/20231226183505!Aws-logo.png/120px-Aws-logo.png does not exist
2023-12-26 18:54:02 e4246cd0f86d wiki: S3FileBackend: doGetFileStat(): obtaining information about wiki/thumb/Aws-logo.png/640px-Aws-logo.png in S3 bucket main-eb-app-assets
2023-12-26 18:54:02 e4246cd0f86d wiki: FileBackendStore::ingestFreshFileStats: File mwstore://AmazonS3/local-thumb/Aws-logo.png/640px-Aws-logo.png does not exist
Sorry for the inconvenience. Do you have any idea where the problem might be? Thank you very much.
File mwstore://AmazonS3/local-thumb/Aws-logo.png/640px-Aws-logo.png does not exist
This is not an error.
MediaWiki always checks "does thumbnail exist?" to determine if it needs to generate a new thumbnail. "Does not exist" is a completely normal outcome of this check (MediaWiki will make a new thumbnail).
Creating a thumbnail can fail for a number of reasons, such as missing original file (Aws-logo.png), not having ImageMagick, conversion process exceeding $wgMaxShellMemory
, etc.
Hello,
I am experiencing an issue with displaying images in my private MediaWiki instance, which is configured to use AWS S3 for image storage.
Images are successfully uploaded to the S3 bucket e.g.
but they are not correctly displayed in the wiki. The images appear to be missing or broken.
The source URL for images in the wiki is generated in the following format:
src="/img_auth.php/logo.png?20231222135434"
. This seems to be incorrect or not properly linked to the S3 bucket where the images are stored.I am seeking assistance to correctly link the S3 stored images with my private wiki so that they display properly. Any guidance or suggestions to resolve this issue would be greatly appreciated.
Thank you in advance for your help.
LocalSettings.php
Error log