How do I store crypto coins icons locally?

By default OUGC Crypto Prices uses the API returned image URLs to display crypto coin images. This means that administrators don't have control over the resources served by default.

To change this and render images directly from your server, follow the next steps.

  1. Download the attached package, it stores all coin icons for all supported currencies of the plugin in SVG format.
  2. Unpack the file, inside you should find the ougc_crypto_prices directory holding all icon SVG files.
  3. Upload the contents of the package to your server, inside the images directory. At the end all SVG files should be accessible through the path mybb/images/ougc_crypto_prices/.
  4. Edit the ougccryptoprices_item template, find:
    <img src="{$image}" title="{$name}" alt="{$name}" loading="lazy" />

    Replace with:
    <img src="{$mybb->asset_url}/images/ougc_crypto_prices/{$symbol}.svg" title="{$name}" alt="{$name}" loading="lazy" style="max-height: 24px;" />

Please note the max height set with the style element in the img tag.

There are currently no posts to display. Be the first one to leave a reply.

Current time: 13 Jun, 2024, 1:12 am