WordPress soft reject | No image placeholders

Hi there! I’ve got a soft reject, and I’d like to clarify the reviewer issue remark.

No image placeholders, if user doesn’t want an image, nothing should display. Theme still needs to work properly without them. Example(s): Markup 2021-11-09 at 15.22.39.png - Droplr

What I’ve understood, the problem is that, if user remove image which it uses like background of the block, the block crushed.

Q1: What exactly should to do?
Q2: Can I use image placeholder from https://placeholder.com/ for replacing instead?
My code is next:

<section
    class="hero-widget wow fadeIn"
    style="background-image: url(<?php echo esc_url(ale_get_option('blog_cover')); ?>)">
    <div class="wrapper">
        <!-- Left block -->
        <div class="left-block">
        <!-- Hero text box -->
        <div class="hero-text-box">
            <h2 class="hero-title font_one"><?php echo esc_attr(the_title()); ?></h2>
            <?php if(ale_limit_excerpt(8)) : ?>
                <div class="hero-subtitle font_one"><?php echo ale_limit_excerpt(8); ?></div>
            <?php endif; ?>
        </div>

        <!-- Hero bread crumbs -->
        <div class="hero-bread-crumbs">
            <ul class="breadcrumbs-list font_one">
                <li>
                    <a href="<?php echo esc_url(home_url("/")); ?>">
                        <?php echo esc_attr(ale_get_option('brand_text')); ?>
                    </a>
                </li>
                <li class="font_two">/</li>
                <li>
                    <span class="is-active">
                        <?php echo esc_attr(the_title()); ?>
                    </span>
                </li>
            </ul>
        </div>
        </div>
    </div>
</section>

Hi @SuperbCode,

As far I can understand I think if the user not set background image for Blog cover then in background for Blog cover should not place (none). So, in settings (theme options) there should not set any placeholder for for Blog cover. by default

style="background-image: url(<?php echo esc_url(ale_get_option('blog_cover')); ?>)">

Thanks

How can I make it possible for a user to change the cover of a blog? I want to understand the solution to this remark ?
I have hero-header block with image cover I would like to provide change it by user.

if ( !empty( $ale_get_option(‘blog_cover’)) ) :
echo “style=“background-image: url(’. esc_url(ale_get_option(‘blog_cover’)) .’)””
else :
echo “”;
endif;

Does it allow using image cover from theme options ?

One more question, does it allow using image placeholder from https://placeholder.com/ as alternative case for block cover image ?

if ( !empty( $ale_get_option(‘blog_cover’)) ) :
echo “style=“background-image: url(’. esc_url(ale_get_option(‘blog_cover’)) .’)””
else :
image placeholder from https://placeholder.com/;
endif;

Leave it empty

else :
echo “”;
endif;

it will be good idea.

You must have to keep background image none in case the user not set the cover image. and it is the main things reviewer asked you.

Thanks for explanation, I’ve understood.