2
在我的自定義模塊中,我使用下面的代碼來顯示圖像。具有值50,50的圖像樣式「user_profile_image」。Drupal - 圖像調整大小
它給了我這樣的html。
我不想在瀏覽器中使用height =「50」width =「50」來調整圖像大小。
我可以在服務器上調整它的大小,以便客戶端不需要高度和寬度屬性。
print theme('image_style', array('path' => $res_value->_field_data['users_node_uid']['entity']->picture->uri, 'style_name' => 'user_profile_image'));
是我的看法是錯誤的。它不是HTML調整大小的圖像。 :)非常感謝您提供這些信息。 – 2015-04-06 09:37:36
很高興爲您效勞 – ArK 2015-04-06 09:40:43