Skip to content

Commit

Permalink
featured image placeholder updated
Browse files Browse the repository at this point in the history
  • Loading branch information
rinkalpagdar committed Dec 18, 2024
1 parent f3ab0c2 commit e97d0ea
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export const FeaturedImageView = ( {
alt=""
/>
);
}else{
return(
<span className="fields-controls__featured-image-no-image"></span>
)
}

return <span className="fields-controls__featured-image-placeholder" />;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions packages/fields/src/fields/featured-image/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,18 @@ fieldset.fields-controls__featured-image {
display: block;
}
}
span.fields-controls__featured-image-no-image{
background-image: url('/wp-content/plugins/gutenberg/packages/fields/src/fields/featured-image/no-pictures.png');
position: absolute;
left: 0;
right: 0;
display: block;
z-index: 999;
height: 50%;
width: 50%;
background-repeat: no-repeat;
background-size: contain;
transform: translateY(-50%);
top: 50%;
margin: 0 auto;
}

0 comments on commit e97d0ea

Please sign in to comment.