Trying to display the avatar(image) from a folder already stored using a form.
Error: image not displayed. I found the URL doubled in the inspect element:
----------inspect element--------------------------
background-image: url(http://phpstack-130512-487107.cloudwaysapps.com/site/http%3A//phpstack-130502-487107.cloudwaysapps.com/site/components/com_jux_testimonial/uploads/5ad865a54354a-seyaligal-LOGO.jpg);
----------inspect element--------------------------
Edited the inspect element code and checked.
----------inspect element edited--------------------------
background-image: url(http://phpstack-130502-487107.cloudwaysapps.com/site/components/com_jux_testimonial/uploads/5ad865a54354a-seyaligal-LOGO.jpg);
----------inspect element edited--------------------------
It is now displaying the image.
Screen shot attached.
Please advice as to how to debug this issue.
Thanks in advance.
With warm regards, Venkat Chinniah
three screen shots merged and attached as one picture
Code Part 1:
<div class="avatar-testimonial">
<?php
if ($userNameEffects == 1) {
if ($useGravatar && $item->jux_gravatar) {
echo '<div class="user_avatar_rotate avatar' . $column . '" style="background-image: url(' . $item->jux_gravatar . '); "></div>';
} else if ($item->jux_avatar) {
$jux_avatar = $item->jux_avatar;
echo '<div class="user_avatar_rotate avatar' . $column . '" style="background-image: url(' . $linkAvatar = JUri::base() . implode('/', array_map('rawurlencode', explode('/', $jux_avatar))) . '); "></div>';
} else {
echo '<div class="user_avatar_rotate avatar' . $column . '" style="background-image: url(' . $linkAvatar = JUri::base() . implode('/', array_map('rawurlencode', explode('/', $juxAvatarDefault))) . '); "></div>';
}
?>
<?php
} else {
if ($useGravatar && $item->jux_gravatar) {
echo '<div class="user_avatar" style="background-image: url(' . $item->jux_gravatar . '); "></div>';
} else if ($item->jux_avatar) {
$jux_avatar = $item->jux_avatar;
echo '<div class="user_avatar" style="background-image: url(' . $linkAvatar = JUri::base() . implode('/', array_map('rawurlencode', explode('/', $jux_avatar))) . '); "></div>';
} else {
echo '<div class="user_avatar" style="background-image: url(' . $linkAvatar = JUri::base() . implode('/', array_map('rawurlencode', explode('/', $juxAvatarDefault))) . '); "></div>';
}
?>
<?php }
?>
Code Part 2:
<div class="avatar-testimonial avatartes<?php echo $column; ?>">
<?php
if ($userNameEffects == 1) {
if ($useGravatar && $item->jux_gravatar) {
echo '<div class="user_avatar_rotate avatar' . $column . '" style="background-image: url(' . $item->jux_gravatar . '); "></div>';
} else if ($item->jux_avatar) {
$jux_avatar = $item->jux_avatar;
echo '<div class="user_avatar_rotate avatar' . $column . '" style="background-image: url(' . $linkAvatar = JUri::base() . implode('/', array_map('rawurlencode', explode('/', $jux_avatar))) . '); "></div>';
} else {
echo '<div class="user_avatar_rotate avatar' . $column . '" style="background-image: url(' . $linkAvatar = JUri::base() . implode('/', array_map('rawurlencode', explode('/', $juxAvatarDefault))) . '); "></div>';
}
?>
<?php
} else {
if ($useGravatar && $item->jux_gravatar) {
echo '<div class="user_avatar" style="background-image: url(' . $item->jux_gravatar . '); "></div>';
} else if ($item->jux_avatar) {
$jux_avatar = $item->jux_avatar;
echo '<div class="user_avatar" style="background-image: url(' . $linkAvatar = JUri::base() . implode('/', array_map('rawurlencode', explode('/', $jux_avatar))) . '); "></div>';
} else {
echo '<div class="user_avatar" style="background-image: url(' . $linkAvatar = JUri::base() . implode('/', array_map('rawurlencode', explode('/', $juxAvatarDefault))) . '); "></div>';
}
?>
<?php }
?>