Skip to content

Commit

Permalink
Fix issue get wrong img src on Grid Widget
Browse files Browse the repository at this point in the history
  • Loading branch information
sonvnn committed Oct 25, 2024
1 parent 9b6dcbb commit c55e39b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/elements/grid/grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
if ($grid_params->get('type', '') == 'image' && $grid_params->get('image', '')) {
$media = '<div class="as-image-cover position-relative overflow-hidden' . $image_border_radius . $hover_effect . $transition . ($media_position == 'bottom' ? ' order-2 ' : '') . '">';
$media .= $layout == 'overlay' ? '<div class="as-image-cover astroid-image-overlay-cover">' : '';
$media .= '<img class="' . ($image_fullwidth ? 'w-100' : '') . ($enable_image_cover || $media_position == 'left' || $media_position == 'right' ? ' object-fit-cover h-100' : '') . ($params->get('card_style', '') == 'none' ? '' : ' card-img-'. $media_position) .'" src="'. Astroid\Helper\Media::getPath() . '/' . $grid_params->get('image', '').'" alt="'.$grid_params->get('title', '').'">';
$media .= '<img class="' . ($image_fullwidth ? 'w-100' : '') . ($enable_image_cover || $media_position == 'left' || $media_position == 'right' ? ' object-fit-cover h-100' : '') . ($params->get('card_style', '') == 'none' ? '' : ' card-img-'. $media_position) .'" src="'. Astroid\Helper\Media::getMediaPath($grid_params->get('image', '')) .'" alt="'.$grid_params->get('title', '').'">';
$media .= $layout == 'overlay' ? '</div>' : '';
$media .= '</div>';
if ( !empty($grid_params->get('link', '')) ) {
Expand Down

0 comments on commit c55e39b

Please sign in to comment.