function resizeImagesOnActivity() {
    var MAX_WIDTH = 450;

    // Go through all elements with an id starting with html-image-
    $("[id^='html-image-']:visible").each(
        function() {
            if ($(this).width() > MAX_WIDTH) {
                if (this.tagName === "IMG") {
                    $(this).removeAttr("width")
                           .removeAttr("height");
                    $(this).width(MAX_WIDTH);
                    $(this).attr({ width : MAX_WIDTH});
                }

                // TODO: Work on resizing canvas elements.
            }
        }
    );
}


