Comments (6)
@hussainImran We just released v1.1.1 with the fix for theContentFix.php
: https://github.com/flyntwp/flynt/releases/tag/v1.1.1
from flynt.
Also images which I added in slider are not showing their path is
/uploads/dynamic/2019/11/imageName.jpg
When I checked /uploads/ directory, didn't found folder dynamic
Testing locally on window 7, XAMP, php7.1*
from flynt.
hi @hussainImran,
you are totally correct about the in_array()
bug. A fix is already on the way.
For the images:
Is your .htaccess
writeable? Could you paste it here? This part is a bit tricky and might not work on all environments yet. In general, it is correct, that the url is /uploads/dynamic/2019/11/imageName.jpg
. First the dynamic
folder in uploads
will not exists. But this should be created the first time you request a file in there.
from flynt.
hi @hussainImran,
you are totally correct about thein_array()
bug. A fix is already on the way.For the images:
Is your.htaccess
writeable? Could you paste it here? This part is a bit tricky and might not work on all environments yet. In general, it is correct, that the url is/uploads/dynamic/2019/11/imageName.jpg
. First thedynamic
folder inuploads
will not exists. But this should be created the first time you request a file in there.
Also there are some notices when using Grid Posts component
Notice: Undefined index: dirname in \flynt-1.1.0\inc\timberDynamicResize.php on line 63
Yes my .htaccess file is writeable. Here it's content
# BEGIN WordPress
# BEGIN Flynt dynamic images
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/wp-content/uploads/dynamic/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /dynamic-images?src=$1 [L,R]
<IfModule mod_setenvif.c>
# Vary: Accept for all the requests to jpeg and png
SetEnvIf Request_URI "\.(jpe?g|png)$" REQUEST_image
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
# Check if browser supports WebP images
RewriteCond %{HTTP_ACCEPT} image/webp
# Check if WebP replacement image exists
RewriteCond %{DOCUMENT_ROOT}/$1.webp -f
# Serve WebP image instead
RewriteRule (.+)\.(jpe?g|png)$ $1.webp [T=image/webp]
</IfModule>
<IfModule mod_headers.c>
Header append Vary Accept env=REQUEST_image
</IfModule>
<IfModule mod_mime.c>
AddType image/webp .webp
</IfModule>
# END Flynt dynamic images
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp-5.0/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp-5.0/index.php [L]
</IfModule>
# END WordPress
from flynt.
@hussainImran so our code is added to the .htaccess
but something is wrong with it.
I am quite certain, that this is related to WordPress living in the subfolder wp-5.0
.
First we should check if the issue is introduced by Flynt, or if it comes from Timber.
To do so, replace the content of inc/timberDynamicResize.php
with
<?php
namespace Flynt\TimberDynamicResize;
use Twig\TwigFilter;
add_action('timber/twig/filters', function ($twig) {
$twig->addFilter(
new TwigFilter('resizeDynamic', ['Timber\ImageHelper', 'resize'])
);
return $twig;
});
With that, you would use the regular Timber resize functionality.
If this does serve the images, we need to do some further debugging. It has most likely todo either with getRelativeUploadDir()
or the home_url()
call in generateImage()
. Could you then provide some more info about your setup? Folder structure, non-standard WordPress constants, plugins used.
We will add some further info about the setup issues for different environments. I am sure we get this sorted out.
from flynt.
Yes that resolved the issue of images.
I have a common WordPress setup on http://localhost/wp-5.0/ with only ACF PRO, WordPress importer and wp reset plugin active.
Thank You
from flynt.
Related Issues (20)
- Issue: npm install errors and warnings HOT 3
- Custom Function function 'n' not found or invalid function name HOT 1
- Trying to dynamically load a slider package, only if required HOT 1
- Unable to install NPM HOT 2
- composer install not working twig/cache-extension is abandoned HOT 15
- How to link scripts correctly HOT 4
- How to implement conditional_logic? HOT 2
- Local Environment (Flynt Next) HOT 2
- Is there a good way to bulk create posts with components? HOT 1
- Minor front and back end issues HOT 4
- Not Getting meta data in GridPostsLatest HOT 6
- Can it be used with a hosted wordpress with limited ssh? HOT 1
- Build Fails HOT 3
- similar build issue on Windows HOT 6
- How to use repo within docker containers - DDEV HOT 6
- Migration Guide HOT 1
- How to add tailwind? HOT 1
- Can't access development site from external device
- How can we call the shortcodes in flynt ? HOT 1
- Flynt v2.1: Cannot correctly save ACF Field Groups HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flynt.