Jump to content

Search the Community

Showing results for tags 'img src='.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • PBX
  • Headsets
  • Nippon
  • Optimizing System
  • Leisure time

Categories

  • Telephone Equipment
  • Repair of power supply units
  • Headsets services
  • Domofon system Nippon
    • Own production
  • Proel CD1803
  • Subscription Service
  • Optimizing System
  • Curious Repairs
  • Other

Categories

  • PBX
    • Instructions
    • Service Manual
  • Telephones
    • Intsructions
    • Service Manual
  • Fax machine
    • Instructions
    • Service Manual
  • Nippon
    • Instructions
    • Service Manual

Forums

  • Your Questions
    • PBX questions
    • Nippon questions
    • Headsets questions
    • Optimization ips4
    • Other Questions
  • Discussions
    • Topics for servicing
    • Topics for installations
    • Optimization ips4.x.x
    • Documentation
    • Other Topics
  • Телефонни централи's Ремонт модули
  • Телефонни централи's Модули втора употреба
  • Телефонна техника's DECT
  • Телефонна техника's Fax
  • Телефонна техника's Pbx
  • Телефонна техника's IP Phone
  • Телефонна техника's Adapters
  • Speed up IPS's Critical CSS
  • Speed up IPS's Web tests
  • Speed up IPS's Online tools
  • Speed up IPS's Me tests
  • Speed up IPS's Little tricks
  • Домофонни разработки от Нофелет's Модули
  • Домофонни разработки от Нофелет's Резервни части
  • Headsets Plantronics, Jabra etc.'s II употреба
  • Ремонти headsets's Plantronics
  • Ремонти headsets's David Clark
  • Резервни части - специализирани's IC
  • Резервни части - разни's IC

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 2 results

  1. If you are using loading images from type "img src=" and the background images on your site, what should you do: - Use image code editing that loads with "img sec=" as described in the article here - Use image code editing that loads with background images as described in the article here - Remove a script if you have already used one or the other method - Place only this script <script> function init() { var imgDefer = document.getElementsByTagName('img'); for (var i=0; i<imgDefer.length; i++) { if(imgDefer[i].getAttribute('data-src')) { imgDefer[i].setAttribute('src',imgDefer[i].getAttribute('data-src')); } } ; $(function(){ $('[data-bg]').each(function(){ var bg = $(this).data('bg'); $(this).css('background-image','url(' + bg + ')'); }); });} window.onload = setTimeout(init, 600); </script> Now all your images will be loaded "onload" Note: If you don't understand these instructions or are looking for help, please contact me. Of course, I will help you, but for a fee.
  2. This is an easy way to load images after time onload. 1. Open template -> core_global_global_includeJS 2. Add this script at the bottom <script> function init() { var imgDefer = document.getElementsByTagName('img'); for (var i=0; i<imgDefer.length; i++) { if(imgDefer[i].getAttribute('data-src')) { imgDefer[i].setAttribute('src',imgDefer[i].getAttribute('data-src')); } } } window.onload = init; </script> 3. For your images which you want loads after that time onload, change to a template code img src. If your code is type for example <img src = "{code ips images}" alt=""> change the code so <img src="data:image/png;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=" data-src="{code ips images}" alt=""> 4. For articles image, find code in template <div class="cCmsRecord_image"> <a href="{$record->url()}" title="{lang="read_more_about" sprintf="$record->_title"}"><img class="ipsImage" src="{file="$record->_record_image_thumb" extension="cms_Records"}"></a> </div> and replace with this <div class="cCmsRecord_image"> <a href="{$record->url()}" title="{lang="read_more_about" sprintf="$record->_title"}"><img class="ipsImage" src="data:image/png;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=" data-src="{file="$record->_record_image_thumb" extension="cms_Records"}"></a> </div> 5. For avatars: Open template core_global_userPhoto, and replace everything with this code {{if $member->member_id and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'members' ) )}} {{$memberURL = ( $warningRef ) ? $member->url()->setQueryString( 'wr', $warningRef ) : $member->url();}} <a href="{$memberURL}" {{if $hovercard}}data-ipsHover data-ipsHover-target="{$memberURL->setQueryString( 'do', 'hovercard' )}"{{endif}} class="ipsUserPhoto ipsUserPhoto_{$size}{{if $classes}} {$classes}{{endif}}" title="{lang="view_user_profile" sprintf="$member->name"}"> <img src="data:image/png;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=" data-src='{$member->photo}' alt='{$member->name}'></a> {{else}} <span class='ipsUserPhoto ipsUserPhoto_{$size} {{if $classes}}{$classes}{{endif}}'> <img src="data:image/png;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=" data-src='{$member->photo}' alt='{$member->name}'></span> {{endif}} Note: If you are already using a script to defer images loaded with "background-image:url...", then read an article about combined use of defer images.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.