Title: Custom Image Block
Last modified: September 27, 2019

---

# Custom Image Block

 *  [hatschiii](https://wordpress.org/support/users/hatschiii/)
 * (@hatschiii)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/custom-image-block/)
 * I’m a newbee and not a programmer… That makes it hard for me 🙁 Hope someone 
   here can help me.
 * What I need
    ————
 * A block that is like the default image block, just need to change the marging-
   top to -8px
 * What I did
    ———– Added a new lazy block named it “header image” added image as
   controll
 * Now I can choose the image when I creat a new post… but, no wonder, there is 
   no output in the post editor and in the post preview.
 * I think I need to place code in the “Frontend HTML” and “Editor HTML” section,
   but don’t know what to get 100% the same block like the default image block. 
   Changing the margin-top then shouldn’t be an issue.
 * Does someone know where I get the code from the default image block?
    -  This topic was modified 6 years, 6 months ago by [hatschiii](https://wordpress.org/support/users/hatschiii/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [hatschiii](https://wordpress.org/support/users/hatschiii/)
 * (@hatschiii)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/custom-image-block/#post-11974874)
 * I also need the default image options which can be set in the right sidebar (
   block options)
 *  Thread Starter [hatschiii](https://wordpress.org/support/users/hatschiii/)
 * (@hatschiii)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/custom-image-block/#post-11978089)
 * no one an idea?
 *  Plugin Author [nK](https://wordpress.org/support/users/nko/)
 * (@nko)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/custom-image-block/#post-11981103)
 * Hi.
 * You can’t just clone the core image block. You are only able to make something
   similar. You can see here an example on how to output image HTML [https://lazyblocks.com/documentation/blocks-controls/image/](https://lazyblocks.com/documentation/blocks-controls/image/)
 * Regards, nK.
 *  Thread Starter [hatschiii](https://wordpress.org/support/users/hatschiii/)
 * (@hatschiii)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/custom-image-block/#post-11981195)
 * Thanks nK. This I have sean in the meantime and it is working… but without the
   image options like size. Do to performance issues I don’t want to place allways
   the full size image if I only need a smaller version.
 *  [Hozefa Saleh](https://wordpress.org/support/users/hozefasmile/)
 * (@hozefasmile)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/custom-image-block/#post-12067770)
 * There are wordpress solution to show smaller images as output. You can add a 
   function in your functions.php file of the theme for it, something like this
 * add_theme_support(‘post-thumbnails’);
    add_image_size(‘medium’, 350, ”, true);//
   Medium Thumbnail // add_image_size(‘custom-size’, 700, 200, true); // Custom 
   Thumbnail Size call using the_post_thumbnail(‘custom-size’);
 * Output your image using wordpress default the_post_thumbnail(‘your required size’);
   in php output of lazy block.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Custom Image Block’ is closed to new replies.

 * ![](https://ps.w.org/lazy-blocks/assets/icon-256x256.png?rev=2584676)
 * [Custom Block Builder - Lazy Blocks](https://wordpress.org/plugins/lazy-blocks/)
 * [Support Threads](https://wordpress.org/support/plugin/lazy-blocks/)
 * [Active Topics](https://wordpress.org/support/plugin/lazy-blocks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/lazy-blocks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/lazy-blocks/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Hozefa Saleh](https://wordpress.org/support/users/hozefasmile/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/custom-image-block/#post-12067770)
 * Status: not resolved