Please sign in to comment.
Separate out imageBase from urlBase.
Summary: urlBase is meant to point to the root of khan-exercises. For images, this isn't entirely appropriate, because khan-exercises just has a copy of the 'canonical' version of the images (which live in the main KA repo). So imagesBase should be the same as urlBase only when the canonical version of the images isn't available, and we have to use the khan-exercises copy. In cases where the canonical version *is* available, we should default to using that. I distinguish the cases where the canonical version is available or not based on testMode. More principled (but also slower) would be to do an actual ajax request for an image, and see if '/images/face-smiley.png' is a 404, or we have to use '/khan-exercises/images/face-smiley.png', and set imageBase that way. But this should work well enough. Pass along the definition of imageBase, as needed. Change imageBase to include the /images directory. Test Plan: One I 'arc mail' this, I'll go to I'll go to one_step_equation_intuition and reading-pictographs-1 on sandcastle.khanacademy.org (for this phabricator revision) and make sure they display the images correctly. We'll also have to double check that they also work correctly once we deploy this to the live site. Reviewers: eater Reviewed By: eater Differential Revision: http://phabricator.khanacademy.org/D986
- Loading branch information...
Showing with 7 additions and 7 deletions.