简体   繁体   English

如何将自定义模块中的响应图像重新加载到 Drupal 9

[英]how reslove responsive image in custom module to Drupal 9

I upgrade the drupal7 to drupal9 how i can make the responsive image in custom module $banner_img['large_image'] = $base_url.'/'.$module_path .我将 drupal7 升级到 drupal9 如何在自定义模块 $banner_img['large_image'] = $base_url.'/'.$module_path 中制作响应式图像。 '/images/flower-02.jpg'; '/images/flower-02.jpg'; $banner_img['mid_desktop_image'] = $base_url.'/'.$module_path . $banner_img['mid_desktop_image'] = $base_url.'/'.$module_path 。 '/images/flower-02.jpg'; '/images/flower-02.jpg'; $banner_img['ipad_image'] = $base_url.'/'.$module_path . $banner_img['ipad_image'] = $base_url.'/'.$module_path 。 '/images/flower-02730.jpg'; '/images/flower-02730.jpg'; $banner_img['mobile_image'] = $base_url.'/'.$module_path . $banner_img['mobile_image'] = $base_url.'/'.$module_path 。 '/images/flower-02560.jpg'; '/images/flower-02560.jpg'; please help请帮忙

In drupal 9, responsive images are handled differently.在 drupal 9 中,响应式图像的处理方式不同。 You need both responsive images and breakpoint modules.您需要响应式图像和断点模块。

Please see this as a guide: https://www.prometsource.com/blog/how-set-responsive-images-drupal-9-0请将此作为指南: https ://www.prometsource.com/blog/how-set-responsive-images-drupal-9-0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM