Resized images
-
@phenomlab good morning Mr I have a question for you about creating home page like categories page . can you help me with that?
-
@phenomlab are you running latest version of nodebb now? Did this happen to any new uploads? I haven't been able to reproduce this myself.
Can you put a console log on this line and see if it deletes any resized images? The following should work.
console.log('deleting files', filePaths, new Error('test').stack);
-
@phenomlab I just ran head-first into this.
The issue is that when you upload a picture to NodeBB, we run it through an image processor to resize it. We name that file
{original-filename}-resized.png
.When the picture is added to the post, the resized version is the one that is inserted into the composer. (I don't know if this is still the case because this isn't happening for me right now)
But when you click on it, NodeBB transparently removes any
-resized
suffix and shows you the original, full-size image.However, if your image's original filename ended with
-resized
, then when it got chopped off, of course it 404s.Now that I can reproduce the issue, I'll take a look.
-
@phenomlab Can you try with the latest commit on
develop
?fix: naive checking to handle uploaded images whose filenames end wit… · NodeBB/NodeBB@1268ed5
Node.js based forum software built for the modern web - fix: naive checking to handle uploaded images whose filenames end wit… · NodeBB/NodeBB@1268ed5
GitHub (github.com)
-
@julian not fixed it seems - see
v3 & Harmony diary / thoughts / code snippets
Been a bit quiet lately, so thought I’d share some new things I’m going to be adding into Sudonix for the v3 release (based on Harmony). As you probably know...
Sudonix | A one-stop-shop for all your technology questions (sudonix.org)
As you can see below
Removing "resized" makes the image show, but not if left as is.