Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with Visual Composer? #89

Closed
iandevlin opened this issue Apr 27, 2015 · 4 comments
Closed

Compatibility with Visual Composer? #89

iandevlin opened this issue Apr 27, 2015 · 4 comments

Comments

@iandevlin
Copy link

I currently have the unfortunate task of having to work with a purchased Wordpress theme that uses Visual Composer (or Composter as I call it...) and was hoping to use this picturefill plugin to help reduce the mess.

But it doesn't appear to work as I assume that VC must be using its own media uploader or something.

Can you possibly confirm this?

@tevko
Copy link
Member

tevko commented Apr 27, 2015

Any way you can get us some more info on VC and possible errors, etc?

@iandevlin
Copy link
Author

Visual Composer

I can't see any errors, it's just that when I upload an image via VC's "single image" widget, no extra sizes are created, and the code produced has no srcset. I'm pretty sure it's VC's fault and nothing to do with your plugin, I was just making sure.

@jaspermdegroot
Copy link
Member

We hook into image_send_to_editor to add the srcset and sizes attributes. This action only runs when you use the "Add Media" button in the default editor to insert an image, not when you insert them with the Visual Composer editor. This might be a problem with other page builder plugins as well.

With the way we currently add the attributes to images that are in the post content there is no way we can fix this at our end. Visual Composer doesn't run actions when it inserts media that we could hook into so you would have to change the code to make it work.

If we would decide to switch to content filtering (see #83) this would no longer be a problem. I suggest to close this ticket and add this to the list of "pros" of content filtering. I know that many of the popular themes on ThemeForest include Visual Composer so it would be a nice benefit.

@iandevlin
Copy link
Author

Ok, cool, as I said, I just wanted to verify that this is indeed what it was and not that I was doing something stupid (always likely).

Thanks for the reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants