diff --git a/core/modules/responsive_image/responsive_image.module b/core/modules/responsive_image/responsive_image.module
index ea75e5e..3898e14 100644
--- a/core/modules/responsive_image/responsive_image.module
+++ b/core/modules/responsive_image/responsive_image.module
@@ -85,7 +85,6 @@ function responsive_image_theme() {
'attributes' => array(),
'mapping_id' => array(),
),
- 'function' => 'theme_responsive_image',
),
'responsive_image_formatter' => array(
'variables' => array(
@@ -157,7 +156,9 @@ function theme_responsive_image_formatter($variables) {
}
/**
- * Returns HTML for a responsive image.
+ * Prepares variables for a responsive image.
+ *
+ * Default template: responsive-image.html.twig.
*
* @param $variables
* An associative array containing:
@@ -173,7 +174,7 @@ function theme_responsive_image_formatter($variables) {
*
* @ingroup themeable
*/
-function theme_responsive_image($variables) {
+function template_preprocess_responsive_image(&$variables) {
// Make sure that width and height are proper values
// If they exists we'll output them
// @see http://www.w3.org/community/respimg/2012/06/18/florians-compromise/
@@ -187,23 +188,12 @@ function theme_responsive_image($variables) {
}
$image = \Drupal::service('image.factory')->get($variables['uri']);
- $sources = responsive_image_build_source_tags($image, $variables);
- $output = array();
- $output[] = '';
- return SafeMarkup::set(implode("\n", $output));
}
/**
- * Helper function for theme_responsive_image().
+ * Helper function for template_preprocess_responsive_image().
*
* Builds an array of render arrays that will output