Images disappear in post with apparently no reason

Posted in: Newspaper
Post count: 5

In some posts image are not showing anymore !
The images also disappear from media library…

https://www.grizette.com/morceaux-choisis-histoire-de-lart-exposition-uzes/
https://www.grizette.com/camping-a-montpellier-et-environs/
https://www.grizette.com/la-pampa-plage-privee-la-grande-motte/

  • This topic was modified 4 years by Bash.
Post count: 20

This happens to me occasionally. The image disappears from the web page. It shows that the image is still in the library and reposting that same image does nothing. In order to restore the photos, I must delete them from the library and then upload them again from my computer. Then I must post them on the articles again. I have not been able to figure out what causes this, but fortunately it does not happen often.

Post count: 5

Thanks !
But i think i’ve found the problem, it’s because of a rewrite rule i’ve put in the HTACCESS file to get rid of AMP :
# Redirect from AMP to non-AMP path
RewriteEngine On
RewriteCond %{REQUEST_URI} (.+)/*amp(.*)$
RewriteRule ^ %1/ [R=301,L]

And now all the images witn “AMP” in the name (like camping) are invisible
How can i do to fix it ?
Thanks for your response

Post count: 21065

Hello!

I’ve checked your links(amp also) from above and the images are displaying just fine.
Did you solve the issue?

Thank you!

Post count: 5

Hello Bettina,
The images are displaying fine because i’have removed the rewrite code from HTACCESS.
How can i modify this code to rewrite only AMP pages and not all media and pages with the expression “amp” in the URL ?
Thanks for your support.

Post count: 21065

Hello!

You can do this with a plugin. But, unfortunately, we do not have any tested plugin with our theme in order to achieve this.

Thank you!

Post count: 5

Hello Bettina,
thanks for the answer but we don’t need a plugin as we can achevieve this in the HTACCESS file. We just need a litlle help on the exact syntax to use, because i’m not a specialist of this.

# Redirect from AMP to non-AMP path
RewriteEngine On
RewriteCond %{REQUEST_URI} (.+)/*amp(.*)$
RewriteRule ^ %1/ [R=301,L]

Perhaps we should replace
RewriteCond %{REQUEST_URI} (.+)/*amp(.*)$
by
RewriteCond %{REQUEST_URI} (.+)/?amp(.*)$
based on the AMP url structure witch is sommething like https://domain.com/page/?amp=
What do you think ?

  • This reply was modified 4 years by Bash.
Post count: 21065

Hello!

It should be something like this: RewriteCond %{REQUEST_URI} (.+)/amp(.*)$

Thank you!

Post count: 5

Ok thanks,
i’ll try this
Have a nice day

Viewing 9 posts - 1 through 9 (of 9 total)
The forum ‘Newspaper’ is closed to new topics and replies.