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.