Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

How to change colors on an SVG image??

  • Hi there, I’m a bit confused regarding the ‘image’ block in Generate Blocks. I would expect to be able to use an SVG image in this block, and to then be able to control the color of the SVG by using css.

    I can use an SVG file, but this gets output on the front end as an and therefore the ability to use css to control the colors is gone.

    Even more confusing is that you do seem to have this capability on the Headline and Button element. I would try to use one of those but then on the back end it looks odd because even if I do not input any text it still shows ‘Headline…’ as a placeholder, so that is no good either (I understand the placeholder doesn’t get output on the front end but I am building this site for a large company and it will confuse the staff who need to use it).

    Can GB really not output an image as an SVG?? Or am I just missing something.

    Thanks in advance,

    Keith

  • Hi there,

    I would expect to be able to use an SVG image in this block, and to then be able to control the color of the SVG by using css.

    SVG images are HTML codes, you can use a headline block to add the SVG code, and control the SVG code’s colour by controlling the headline block’s color.

    If you use an image block, it becomes an image, it’s no longer HTML, and thus you can not change an image’s color.

    Hope that’s clear.

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