Resized images
-
Not sure when exactly this started to happen, but I now get broken images on my site - for example
According to the console, the original attachment is suffixed with
-resized
but I do not see a corresponding file, so the render fails./assets/uploads/files/1656084919400-blurred-resized.png
does not exist, but/assets/uploads/files/1656084919400-blurred.png
does.Any ideas? Currently running
3.8.3
.Whilst not the same topic, there seems to be a relationship in the form of
resized
with this topicResized images are sometimes larger than before
While my users are uploading images all day long, my disk space goes down pretty fast and I wanted to see why. One thing I found is that NodeBB seems to resi...
NodeBB Community (community.nodebb.org)
-
@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.