Replies: 2 comments
-
|
I'm not sure I understand the issue. Are you trying to save two copies of the image, each with a different size? |
Beta Was this translation helpful? Give feedback.
-
|
Eventually yes, but that is not what my issue is. I'm not sure how to explain it more clearly. When I clone your repo and run the app locally, navigate to 127.0.0.1:8000/posts, and create a new post and uploading a large image at 3300 x 2550, shouldn't the uploaded image be resized to what is set in constants.py (1100px)? Instead, the uploaded image's native width, both in the posts and post_detail views, is still 3300px. It seems two images are being created after upload, one in media, and one in media/uploads. The app is referring to the one in media/uploads, which is the original sized image. The one in media is the resized image, but how can I reference that instead of the one in media/uploads? The Post object is storing the path to the image in in media/uploads. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Alice, I cloned your repository for the Basic Blog as I'm familiarizing myself with Pillow. After getting your repo running locally and uploading a huge image to test the resizing, I'm noticing the front end is still loading the original large image for both the thumbnail and detail views. How can we reference the resized image that was created in media root instead of media/uploads?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions