While I do not know how to do it realtime, I know it is possible to do after each save. You can use emacs local variables to do the trick. https://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html#Specifying-File-Variables .
This will generate all latex fragments whenever you save the file. Just append this to the end each file where you want this.
# Local variables:
# after-save-hook: org-preview-latex-fragment
# end:
If you would like to apply it to all org mode files you will need to use hooks. See this reference for how to apply a hook in only one mode https://stackoverflow.com/questions/6138029/how-to-add-a-hook-to-only-run-in-a-particular-mode#6141681. This hook will only be active when you are in org mode.
(add-hook 'org-mode-hook
(lambda ()
(add-hook 'after-save-hook 'org-preview-latex-fragment nil 'make-it-local)))
Note After reading the org.el
definitions for org-preview-latex-fragment
it is obsolete past org-mode > 8.3. It looks like you need to toggle the latex fragment display. What the following code does is check if the latex fragments are currently rendered if so toggle twice if not toggle once on save)
(defun my/org-render-latex-fragments ()
(if (org--list-latex-overlays)
(progn (org-toggle-latex-fragment)
(org-toggle-latex-fragment))
(org-toggle-latex-fragment)))
(add-hook 'org-mode-hook
(lambda ()
(add-hook 'after-save-hook 'my/org-render-latex-fragments nil 'make-the-hook-local)))