Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
FIX: Images not appearing
DESCRIPTION
Background:
Occasionally, images at certain sites wouldn't load and the user could only see the placeholder image. This issue was raised by Michael here. After investigating CloudWatch with @mgdaily, we found that the api request was returning a 413 error because there was too much data to return. The problem here was that we were sending the entire image header to the backend when really, all we needed from the header was
SMARTSTK
andSSTKNUM
to be able to group images. The frontend issue was that images were not loading due to the backend.Implementation:
After fixing the backend here, all I had to do was change how
SMARTSTK
andSSTKNUM
were obtained. Inrecent_images_condensed
instead of checking forcur.header.SMARTSTK
orcur.header.SSTKNUM
, I simply checked forcur.SMARTSTK
andcur.SSTKNUM
because now these keys were a part of thecur
object rather than keys inside theheader
object. I followed this structure throughout the code whereverheader
was referenced.VISUALS
Internal server error
No images loading in eco2 site before fix
Images loading in eco2 after fix