-
Notifications
You must be signed in to change notification settings - Fork 918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move VPN Resource Center images from Contentful CDN to Bedrock media #14198
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #14198 +/- ##
==========================================
+ Coverage 76.60% 77.10% +0.50%
==========================================
Files 144 145 +1
Lines 7818 7894 +76
==========================================
+ Hits 5989 6087 +98
+ Misses 1829 1807 -22 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this locally and things seem to work as expected 👍
I did notice a lot of the images are quite large, and we can save between 60% and 80% in file size by running things through tinypng. It would be nice to do that before merging?
f95d42b
to
c5a29c1
Compare
642af99
to
88d155b
Compare
@alexgibson Images optimised in 88d155b - thanks for the reminder! |
Marking this as Do Not Merge, but could still do with a final review. It's ready to roll, but we may as well leave it until later in case we need to edit any copy. If we change images, this PR would need updating, but not copy changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r++
…nstead Some of the filenames are not very elegant, but they match what we are using in the templates, which draw data fro the DB, so if we rename them as files, here we should rename them in the DB too. They will only be around for a relatively short time as we move them back to a CMS before long.
…e VPN Resource Center contentful pages, so that they match the renamed files just added to the codebase
Now we're serving images from Bedrock's statics, and we know we're not adding new content, we want to turn off the sync so that it doesn't rewrite the HTML back to using the Contentful CDN
10a6262
to
e48c310
Compare
Do not merge for now.One-line summary
This changeset moves the VPN RC away from using images live-hosted by Contentful.
It:
contentful_contentfulentry
table appropriately. (It swaps thesrc
and/orsrcset
attributes ofimg
tags from full Contentful CDN URLs to local image paths instead, matching the files added to the codebase.Significant changes and points to review
The data migration is not pretty, but should make sense. Please call out anything that looks too strange.
Issue / Bugzilla link
No ticket
Testing
Locally:
main
run./bin/run-db-download.py --force
./manage.py migrate
which should apply one migration (0007) in the contentful app