Title: [Plugin: EG-Attachments] SSL compatibility
Last modified: August 20, 2016

---

# [Plugin: EG-Attachments] SSL compatibility

 *  Resolved [Gytis Repečka](https://wordpress.org/support/users/kelmas/)
 * (@kelmas)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-eg-attachments-ssl-compatibility/)
 * EG Attachments can cause error on SSL-enabled site, because it loads CSS file
   via HTTP regardless enabled HTTPS. To fix this, **lib/eg-plugin.inc.php** has
   to be edited:
    Find: `$this->plugin_url = trailingslashit(WP_PLUGIN_URL.'/'.$
   plugin_base_path);` And replace with: `$this->plugin_url=trailingslashit(plugins_url().'/'.
   $plugin_base_path);`
 * This is because WP_PLUGIN_URL is legacy constant that does not take into account
   SSL. Would be great if author include this with updates.
 * [http://wordpress.org/extend/plugins/eg-attachments/](http://wordpress.org/extend/plugins/eg-attachments/)

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

 *  Plugin Author [emmanuelg](https://wordpress.org/support/users/emmanuelg/)
 * (@emmanuelg)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-eg-attachments-ssl-compatibility/#post-2186884)
 * Hi Gytis
 * Thanks for the information. I will modify the file `lib/eg-plugin.inc.php`. The
   version 1.8.2 should be published soon.
 * Emmanuel.
 *  Plugin Author [emmanuelg](https://wordpress.org/support/users/emmanuelg/)
 * (@emmanuelg)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-eg-attachments-ssl-compatibility/#post-2187035)
 * Version 1.8.2 published with requested modification.
 *  Thread Starter [Gytis Repečka](https://wordpress.org/support/users/kelmas/)
 * (@kelmas)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-eg-attachments-ssl-compatibility/#post-2187079)
 * Great, works smooth now 🙂
 *  [mvied](https://wordpress.org/support/users/mvied/)
 * (@mvied)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-eg-attachments-ssl-compatibility/#post-2187113)
 * I’m not sure how backwards compatible you’d like to keep your plugin, but in 
   my plugins I usually do something like this.
 *     ```
       if ( version_compare( get_bloginfo('version'), '2.8', '>=' ) ) {
       	$this->plugin_url = plugins_url('', __FILE__);
       } else {
       	$this->plugin_url = WP_PLUGIN_URL . '/' . plugin_basename(dirname(__FILE__));
       }
       ```
   

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

The topic ‘[Plugin: EG-Attachments] SSL compatibility’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/eg-attachments_fbfbfb.svg)
 * [EG-Attachments](https://wordpress.org/plugins/eg-attachments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/eg-attachments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/eg-attachments/)
 * [Active Topics](https://wordpress.org/support/plugin/eg-attachments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/eg-attachments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/eg-attachments/reviews/)

## Tags

 * [HTTPS](https://wordpress.org/support/topic-tag/https/)
 * [SSL](https://wordpress.org/support/topic-tag/ssl/)

 * 4 replies
 * 3 participants
 * Last reply from: [mvied](https://wordpress.org/support/users/mvied/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-eg-attachments-ssl-compatibility/#post-2187113)
 * Status: resolved