Site logo

[Support request] Add border to images if primary color is white

Home Forums Support [Support request] Add border to images if primary color is white

Home Forums Support Add border to images if primary color is white

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2461360
    Max

    Is it possible to add a border to all images in single posts, but only if the primary color of that image is white?

    I have some articles with screenshots of web applications that have white backgrounds, and I would like to add a border to those. Without having to add a global style or css class every time. Would be nice if it happens automatically.

    See example: https://jmp.sh/bcNCue2R

    Ideally it would somehow analyze the image, and add a class to all images that have a (nearly) white background.

    Thanks!

    #2461515
    David
    Staff
    Customer Support

    Hi there,

    the simple answer is no.
    I dare say it is possible as there are plugins and server side library’s that could get the dominant color and analyse its luminosity. And then filter in a class to the attachments HTML if a certain threshold is passed. But that would require custom development.

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