-
Notifications
You must be signed in to change notification settings - Fork 132
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
Image filters #1322
Image filters #1322
Conversation
The implemented hooks allow a addon developer to define other image formats that should be included in to a epub201.
Codecov Report
@@ Coverage Diff @@
## dev #1322 +/- ##
============================================
- Coverage 61.25% 61.25% -0.01%
- Complexity 4127 4129 +2
============================================
Files 112 112
Lines 18079 18084 +5
============================================
+ Hits 11075 11078 +3
- Misses 7004 7006 +2 |
\Pressbooks\Image\resize_down( $format, $tmp_file ); | ||
} catch ( \Exception $e ) { | ||
return ''; | ||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this filter into themeOptionsOverrides
?
Set $this->compressImages = false
next to this code:
https://github.com/pressbooks/pressbooks/blob/dev/inc/modules/export/epub/class-epub201.php#L403
So that it will be easier to spot what's going on if ever there's an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, I see your point, but then it isn't the same filter anymore. How I implemented the filter, you can turn of compression on a per image base and that is needed here, as I don't want to turn of compression for all the images.
Thanks @lukaiser! After some further discussion, we're fine with this as is. |
@greatislander thanks guys! |
Hey guys
Instead of adding the SVG support right away, as I was asking in #1218, I added 4 filters instead:
They allow a plugin developer to add other images to the epub export or use other image generators then wordpress.com.
An example for a SVG plugin:
https://github.com/eSkript/pressbooks-epub-with-svg
I hope that is a solution that makes everybody happy.
Lukas