Image Advanced Issues

Support General Image Advanced IssuesResolved

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #43658
    GuidoGuido
    Participant

    Hi

    I have this piece of code:

    <div class="splide__track">
                <ul class="splide__list"> 
                <?php
                // Displaying uploaded images:
                $images = rwmb_meta( 'team_member_photos', [ 'size' => 'full' ] );
                ?> 
                    <?php foreach ( $images as $image ) : ?>
                        <li class="splide__slide"><a href="<?= $image['full_url'] ?>"><img src="<?= $image['url']; ?>"></a></li>
                    <?php endforeach ?>
                </ul>             
            </div>

    It outputs this html:

    <div class="splide__track splide__track--slide splide__track--ltr splide__track--draggable" id="splide01-track" style="padding-left: 0px; padding-right: 0px;" aria-live="polite" aria-atomic="true">
                            <ul class="splide__list" id="splide01-list" role="presentation" style="transform: translateX(0px);"> 
                                 
                                                                <li class="splide__slide is-active is-visible" id="splide01-slide01" role="tabpanel" aria-roledescription="slide" aria-label="1 of 2" style="margin-right: 30px; width: calc(((100% + 30px) / 3) - 30px);">
                                        <a href="https://goodstory.ca/wp-content/uploads/Jenniffer-Alvarenga.jpg"><img src="https://goodstory.ca/wp-content/themes/wp-expert/https://goodstory.ca/wp-content/uploads/Jenniffer-Alvarenga.jpg"></a>
                                    </li>
                                                                <li class="splide__slide is-visible is-next" id="splide01-slide02" role="tabpanel" aria-roledescription="slide" aria-label="2 of 2" style="margin-right: 30px; width: calc(((100% + 30px) / 3) - 30px);">
                                        <a href="https://goodstory.ca/wp-content/uploads/Jen.jpg"><img src="https://goodstory.ca/wp-content/themes/wp-expert/https://goodstory.ca/wp-content/uploads/Jen.jpg"></a>
                                    </li>
                                                        </ul>                         
                        </div>

    If you look at the urls then <a> is fine but <img src /> is wrong.

    The <img src /> url is outputting "https://goodstory.ca/wp-content/themes/wp-expert/" before the url of the image.

    Can somebody help me with this? Can't figure it our why?

    Thanks
    Guido

    #43659
    GuidoGuido
    Participant

    Last part of the message went wrong. This is it:

    If you look at the urls then <a> is fine but <img src> is wrong.

    The ` url is outputting "https://goodstory.ca/wp-content/themes/wp-expert/" before the url of the image.

    Can somebody help me with this? Can't figure it our why?

    Thanks
    Guido

    #43660
    GuidoGuido
    Participant

    The ` url is outputting "https://goodstory.ca/wp-content/themes/wp-expert/" before the url of the image.

    Should be:

    The <img src /> url is outputting "https://goodstory.ca/wp-content/themes/wp-expert/" before the url of the image.

    #43670
    PeterPeter
    Moderator

    Hello,

    I'm using your custom code to output the images and do not see that issue, screenshot https://imgur.com/lsxVcqj

    You can use the function var_dump() to recheck the element url of the variable $images.

    #43692
    GuidoGuido
    Participant

    Hi Peter,

    I used var_dump() https://pastebin.com/8eVG3h2X

    URL's look good.

    #43695
    GuidoGuido
    Participant

    Hi Peter,

    It might be a Pinegrow issue. I am using pinegrow to cretae WordPress themes.

    If i use their WordPress action then it works: https://snipboard.io/E4IWOr.jpg

    So good for now.

    Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.