lpa Posted February 16, 2022 Share Posted February 16, 2022 We need to create a preview of a page with data retrived through an external api without saving the page. The page consists of text, images and embeded HTML-items (youtube video, twitter feed-item etc). The preview is never saved as a page as it is only for preview purposes. Is it possible to create a new PageImage object in the memory, do cropping and resizing and show the new manipulated image on the preview page purely in memory? Link to comment Share on other sites More sharing options...
bernhard Posted February 16, 2022 Share Posted February 16, 2022 Counter question... are you sure it's a good idea to do that in memory for every request? Wouldn't it be better to do it once, save the result and then just return the results from the saved page rather than recreating it on every request? Link to comment Share on other sites More sharing options...
lpa Posted February 16, 2022 Author Share Posted February 16, 2022 This is a journal site where the content of articles is edited in an editorial system. The writer wants to see the preview of the article during the editing phase. The article is saved to the site only when it is ready to be published. We don't want the article to be saved before it is ready to be published. Link to comment Share on other sites More sharing options...
bernhard Posted February 17, 2022 Share Posted February 17, 2022 I'd use Nette then: https://doc.nette.org/en/utils/images 1 Link to comment Share on other sites More sharing options...
kongondo Posted March 8, 2022 Share Posted March 8, 2022 On 2/16/2022 at 6:32 PM, lpa said: The article is saved to the site only when it is ready to be published. Where do you store the article during the editing phase? I am assuming an article can be in this phase for more than a day. Link to comment Share on other sites More sharing options...
lpa Posted March 17, 2022 Author Share Posted March 17, 2022 On 3/8/2022 at 8:25 AM, kongondo said: Where do you store the article during the editing phase? I am assuming an article can be in this phase for more than a day. The articles are edited in an editorial system and we only want to preview them before they are finally ready to be published. Bernhards advice on using Nette was the chosen solution for us. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now