I’ll be looking into this today. What I’m seeing on my site is that images published from WordPress are displayed correctly until Discourse attempts to download the remote image. When that is done, I’m ending up with markup like you are getting in the post:

I am not sure if this is related to changes in WordPress 5.3.
If you are getting the We detected an API request using a deprecated authentication method warning, that will not be causing the issue you are having with images. WP Discourse versions 1.9.6 and greater should not be causing that warning. All API requests from the plugin are now using header based authentication.
The problem seems to be that when the Discourse upload markdown is wrapped in HTML tags, the markdown isn’t getting parsed. For example, this is what I’m seeing for a WordPress post after the Discourse PullHotlinkedImages Job is run:
<small>Originally published at: https://scossar.com/figure-tags-cause-issues/
</small><br>
<figure class="wp-block-image"></figure>
Editing the post to remove any html tags that are surrounding the markdown link solves the issue, but a proper solution will need to be found for this.
If the download remote images to local site setting is enabled on Discourse, the image link will break when Discourse downloads the post from WordPress. The problem will happen any time an image tag with a remote URL is wrapped with HTML tags.
The easiest solutions for this issue are to either disable the download remote images to local site setting, or to not publish full post content from WordPress to Discourse.
In the future, the WP Discourse plugin may remove the option to publish full posts. There are multiple issues that can occurr when publishing full post content from WordPress to Discourse. Most of these issues should be able to be solved by publishing excerpts from WordPress to Discourse and then using the Show Full Post button to display the full post on Discourse. Does this sound like something that could work for your case?
Another possible solution would be to customize the template that is used to publish WordPress posts. Images could be extracted from the posts and then published along with a post excerpt. With a custom template, the image HTML could be structured in a way that doesn’t conflict with the Discourse markdown processor.
Thanks Simon, download remote images to local was the easy solution for now. I am discouraged to hear that publish full posts may go away. The way I currently use it is by publishing a post to wordpress, which then gets published to the Articles section on discourse, which is set to Watching First Post for everyone by default. This way everyone gets an email with the full content of the article, and the best part is they can just reply to the email to add a comment, if they have to take that extra step of visiting the site it’s likely most won’t read the article if there’s just a little snippet, especially if it doesn’t have images which is really important for our site. If publish full posts went away I may consider going away from wordpress and only publish the articles directly in discourse which is not ideal for SEO, etc. but I think the engagement is more important.
سأفتقد النشر الكامل أيضًا.
لست متأكدًا بنسبة 100% مما تقترحه هنا…
كيف ستقوم باستخراج الصور؟ باستخدام تعبير نمطي (Regex)؟
يمكنني تخيل تعبير نمطي يستبدل وسوم الصور ببنية ماركداون صحيحة. هل هذا ما تقصده وهل سيعمل ذلك؟
سأبحث في مدى صعوبة قيام الإضافة بتجميع نسخة HTML أساسية لمحتوى المنشور. أما الخيار الأخير فسيكون استخدام دوال DOMDocument لتحليل المحتوى. فال تعليقات التي تُرجعها منصة Discourse يتم تحليلها باستخدام هذه الدوال، ولم أتلقّ تقارير عن مشاكل متعلقة بذلك.
أعتقد أن نشر مقتطف ثم السماح للمستخدمين بعرض المنشور كاملاً من خلال الضغط على زر “إظهار المنشور الكامل” في Discourse هو على الأرجح أفضل حل لهذه المسألة، لكنني متردّد في إزالة خيار “نشر المنشور كاملاً” من إضافة WP Discourse.
شكرًا لك على التوضيح.
سأطلب من كتابي ببساطة نشر المقال ثم النقر على “تحديث”، إذ يبدو أن النشر ثم تحديث المقال في WordPress يحل دائمًا مشكلة الصور في Discourse.
أفضل أن يقضي كتابي ثانية إضافية في كل مقال على أن تختفي خيار النشر الكامل
إذا كان إعداد الموقع “تنزيل الصور البعيدة إلى محلية” مفعّلًا في ديسكورش، ألا تختفي الصورة مجددًا خلال بضع دقائق من تحديث المنشور؟ إذا لم يكن الأمر كذلك، فسأبحث في السبب وراء حل هذه المشكلة.
لقد قمت بتفعيل هذا الإعداد، ولا تزال الصور تُعرض بشكل صحيح في جميع مقالاتي الحديثة حتى بعد أيام أو أسابيع. إليك مثال على مقال عمره شهر واجهت فيه مشكلة الصور.
أيضًا، تفحصت عناوين URLs للصور من جانب Discourse، وتبيّن أن الروابط هي نفسها المستخدمة في WordPress، مما يعني أن الصور لم يتم تحميلها إلى Discourse. هل يعود ذلك إلى أن الموقع والمنتدى يشتركان في نفس النطاق؟
(الموقع: https://monocycle.info، المنتدى: https://forum.monocycle/info)
لقد قمت للتو بدفع إصدار WP Discourse 2.0.2 إلى مستودع إضافات ووردبريس. من المفترض أن يصحح التحديث المشكلة المتعلقة بالصور التالفة التي كانت تحدث عند نشر المنشورات إلى Discourse باستخدام محرر الكتل.
يتم الآن استخراج الصور، ومعارض الصور، بالإضافة إلى مقاطع الفيديو من يوتيوب وفيميو من المنشورات وتنسيقها بطريقة يمكن لـ Discourse التعامل معها. يُرجى إخباري إذا واجهت أي مشاكل مع التحديث. إذا كانت هناك كتل ووردبريس لا تزال لا تُعرض بشكل صحيح على Discourse، فأخبرني - إذ يمكن الآن تحليل الكتل حسب اسمها، مما يجعل من الممكن حل أي مشاكل.
في الأسبوع القادم، سأضيف فلترًا يمكن ربطه لتحليل أي كتل غامضة للغاية لا يمكن للإضافة التعامل معها.
كان لدي مقالات قديمة تحتوي على روابط فيديو داخل اختصارات [video]، واستخدمت أحدث مقالاتي (أقل من 3 سنوات) إضافة ARVE لتضمين الفيديوهات، التي تضع رابط الفيديو داخل اختصار [arve].
لذلك قمت بتصفية المنشورات من ووردبريس إلى Discourse باستخدام الكود التالي:
كان يعمل بشكل مثالي، حيث كانت روابط الفيديوهات فقط تُمرر إلى Discourse، فتظهر مدمجة هناك.
لكن منذ تحديث WP-Discourse، لم تعد الفيديوهات تظهر على Discourse.
لقد جربت أيضًا لصق رابط يوتيوب مباشرة في محرر tinymce دون استخدام اختصار (تعلمت أن ووردبريس لا يتطلب اختصارًا لتضمين فيديو يوتيوب بطريقة ما… أو ربما يكون ذلك بسبب إحدى الإضافات الأخرى أو السمة الخاصة بي؟ لكني أعتقد أن هذا لا يهم)، وحذفت دوال preg_replace الخاصة بي، ومع ذلك لا تزال الفيديوهات لا تظهر على Discourse.
إليك نصي على ووردبريس (نص عادي، وليس في تبويب WYSIWYG):
تعديل: أيضًا، لاحظت أنه عندما يكون المقال خاصًا على ووردبريس، لا يتم مزامنته على Discourse عند تعديل المقال. هذا مزعج بعض الشيء عندما نرغب في إجراء بعض الاختبارات بشكل خاص.
هذا أمر غريب. كان أملِي من التغيير ألا يؤثر على المنشورات التي تُنشر باستخدام المحرر الكلاسيكي. سأحاول إعادة إنتاج المشكلة. هل يمكنك مشاركة الرمز الذي تظهره عند فتح المنشور في تبويب “نص” بالمحرر؟
يبدو أن WP لا تزال تستخدم مكتبة أخرى غير أصلية، ربما من القالب الخاص بي؟
أظن أن المشكلة من جهتي أكثر منها من جهتكم، ومع ذلك كان كل شيء يعمل بشكل جيد قبل التحديث…